INeedAccessHelp
MIS
Hi
This is the code I'm using to find the number of columns that need sorted. The cells contain date data (ex. Jun - 2002).
Do
.ActiveCell.Offset(0, 1).Activate
testcounter = testcounter + 1
Loop Until IsEmpty(.ActiveCell)
testcounter = testcounter - 1
Below is the code I'm attempting to use to sort the data. This code was created by a macro in Excel. Can anyone tell me how to change it so that Access can read it? I realize the constants "xlAscending", "xlGuess", and "xlLeftToRight" will have to be replaced with "1", "0", and "2" respectively.
Columns("B:H"
.Select
Selection.Sort Key1:=Range("B1"
, Order1:=xlAscending, Header:=xlGuess, OrderCustom:=4, MatchCase:=False, Orientation:=xlLeftToRight
Also, in the "Columns.Select" statement, I would like to use the number in the variable "testcounter" to determine how many of the columns should be selected.
Any help would be greatly appreciated.
Thanks
--Rob
This is the code I'm using to find the number of columns that need sorted. The cells contain date data (ex. Jun - 2002).
Do
.ActiveCell.Offset(0, 1).Activate
testcounter = testcounter + 1
Loop Until IsEmpty(.ActiveCell)
testcounter = testcounter - 1
Below is the code I'm attempting to use to sort the data. This code was created by a macro in Excel. Can anyone tell me how to change it so that Access can read it? I realize the constants "xlAscending", "xlGuess", and "xlLeftToRight" will have to be replaced with "1", "0", and "2" respectively.
Columns("B:H"
Selection.Sort Key1:=Range("B1"
Also, in the "Columns.Select" statement, I would like to use the number in the variable "testcounter" to determine how many of the columns should be selected.
Any help would be greatly appreciated.
Thanks
--Rob