Sorting a column
Bingo! thanks.
"Tom Ogilvy" wrote:
try
Dim rngSort as Range
Set rngSort = ActiveSheet.Range("F2")
rngSort.Sort Key1:=ActiveSheet.Range("F2")
--
Regards,
Tom Ogilvy
"elkrat" wrote in message
...
I have users that need to modify Excel (2000) files that are raw data
tables
dumped from an AS400 query. All the tables are identical in fields,
structure
etc and have to have the same modifications made to each. I have created
code that deletes the unwanted data, but I also need to sort on one
column -
Lname (column F). Because the files are only used to clean up and the list
of
names is then exported for other use, I had to create the code in a
permanent
second file - which is kept open. It would be nice if the code would sort
without making the user perform a separate sort.
this is the code I am using:
Dim rngSort as Range
Set rngSort = ActiveSheet.Range("F2")
rngSort.Sort Key1:=Range("F2")
I get an "error 400" when I run this. I think its because the code is in a
separate file. Any thoughts or suggestions would be helpful.
|