I need to understand the parameters passed to the Excel Sort function when called by VBA. If I use my object viewer and find Sort as a member of Range, I get the following list of parameters.
Function Sort([Key1], [Order1 As XlSortOrder = xlAscending], [Key2],
[Type], [Order2 As XlSortOrder = xlAscending], [Key3],
[Order3 As XlSortOrder = xlAscending], [Header As XlYesNoGuess = xlNo],
[OrderCustom], [MatchCase], [Orientation As XlSortOrientation = xlSortRows],
[SortMethod As XlSortMethod = xlPinYin],
[DataOption1 As XlSortDataOption = xlSortNormal],
[DataOption2 As XlSortDataOption = xlSortNormal],
[DataOption3 As XlSortDataOption = xlSortNormal])
Member of Excel.Range
You will notice that the 4th parameter is Type. Does anyone know what data_type the parameter type is. I've had difficultly finding an explanation of the parameters. Thanks a bunch!!!
-Mike
P.S. a typical syntax to call this function from VBA is
Worksheets("Sheet1").Range("A2:Z10").Sort Key1:=Cells(1, 1), Order1:=xlAscending
I haven't seen a VB program example that makes use of the type parameter.
Function Sort([Key1], [Order1 As XlSortOrder = xlAscending], [Key2],
[Type], [Order2 As XlSortOrder = xlAscending], [Key3],
[Order3 As XlSortOrder = xlAscending], [Header As XlYesNoGuess = xlNo],
[OrderCustom], [MatchCase], [Orientation As XlSortOrientation = xlSortRows],
[SortMethod As XlSortMethod = xlPinYin],
[DataOption1 As XlSortDataOption = xlSortNormal],
[DataOption2 As XlSortDataOption = xlSortNormal],
[DataOption3 As XlSortDataOption = xlSortNormal])
Member of Excel.Range
You will notice that the 4th parameter is Type. Does anyone know what data_type the parameter type is. I've had difficultly finding an explanation of the parameters. Thanks a bunch!!!
-Mike
P.S. a typical syntax to call this function from VBA is
Worksheets("Sheet1").Range("A2:Z10").Sort Key1:=Cells(1, 1), Order1:=xlAscending
I haven't seen a VB program example that makes use of the type parameter.