Ok, sorry for that late reply, I got the columns to sort!! I cant be too excited though because for some reason its not sorting how its suppose to..
Here is my code:
VB Code:
'############################################## '############## ACTIVATE ###################### '############################################## ' align morning grid With MorningGrid If .Rows > 0 Then With MorningGrid.SortObject .Clear .SortColumn(1) = 2 .SortColumn(2) = 3 .SortColumn(3) = 1 .SortOrder(1) = CCLOrderAscending .SortOrder(2) = CCLOrderAscending .SortOrder(3) = CCLOrderAscending .SortType(1) = CCLSortNumeric .SortType(2) = CCLSortString .SortType(3) = CCLSortDateMinuteAccuracy End With .Sort '// Debugging Purposes // For i = 1 To .Rows For ii = 1 To 3 .SelectedRow = i .SelectedCol = ii Debug.Print .CellText(i, ii) Next ii Next i '// End of Debugging // End If End With ' align afternoon grid With AfternoonGrid If .Rows > 0 Then With MorningGrid.SortObject .Clear .SortColumn(1) = 2 .SortColumn(2) = 3 .SortColumn(3) = 1 .SortOrder(1) = CCLOrderAscending .SortOrder(2) = CCLOrderAscending .SortOrder(3) = CCLOrderAscending .SortType(1) = CCLSortNumeric .SortType(2) = CCLSortString .SortType(3) = CCLSortDateMinuteAccuracy End With .Sort '// Debugging Purposes // For i = 1 To .Rows For ii = 1 To 3 .SelectedRow = i .SelectedCol = ii Debug.Print .CellText(i, ii) Next ii Next i '// End of Debugging // End If End With
Here is my what comes up on the debug:
This is for the Morning Grid
09:00 AM Showing / 09.00 / Showing
09:15 AM Appointment / 09.15 / Appointment
10:50 AM Appointment / 10.50 / Appointment
This is for the Afternoon Grid
12:00 PM Appointment / 12.00 / Appointment
04:00 PM Showing / 16.00 / Showing
06:00 PM Open House / 18.00 / OpenHouse
01:30 PM Appointment / 13.30?? / Appointment
06:20 PM To-Do / 18.20 / ToDo
So as you can see, something isnt right when sorting the afternoon grid. I am using the same code for the other grid and the other one works just fine. So I am stuck AGain!!
Any Suggestions??
Btw, thanx for helping me out so far!




Reply With Quote