?
Solved

Flexgrid Compare Event

Posted on 1998-12-17
1
Medium Priority
?
710 Views
Last Modified: 2006-11-17
Does anyone have an example of how to use the "Compare" event of a flexgrid to sort rows. I want to eventually be able to sort by date. Any ideas?
0
Comment
Question by:gcw
1 Comment
 
LVL 8

Accepted Solution

by:
MikeP090797 earned 400 total points
ID: 1451163
Dim S1 as string, s2 as string
G1.Col=1
G1.Row = row1
S1=G1.Text
G1.Row=row2
S2=G1.Text

IF DateValue(S1)>DateValue(S2) then  cmp=-1
IF DateValue(S1)=DateValue(S2) then  cmp=0
IF DateValue(S1)<DateValue(S2) then  cmp=1



0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month17 days, 9 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question