*** ActiveX Control Event *** LPARAMETERS columnheader #define lvwAscending 0 #define lvwDescending 1 *** Check to see if we have clicked on the column header *** That the list is currently sorted by *** If so, we want to toggle the SortOrder IF This.SortKey = ColumnHeader.SubItemIndex This.SortOrder = IIF( This.SortOrder = lvwAscending, lvwDescending, lvwAscending ) ColumnHeader.Icon = IIF( This.SortOrder = lvwAscending, 1, 2 ) ELSE *** user has clicked on new column - initial sort order will become ascending *** Remove the icon from the column we were previously sorting by *** The SortKey is zero based, so we must add 1 to reference the correct ColumnHeader This.ColumnHeaders( This.SortKey + 1 ).Icon = 0 This.SortOrder = lvwAscending This.SortKey = ColumnHeader.SubItemIndex ColumnHeader.Icon = 1 EndIf ThisForm.Refresh