GeorgeDurkee
Programmer
I want to use VB to sort an Escel spreadsheet I just populated. When I use this command
xlSheet.Cells.Sort key1:=Range("A2"
, Order1:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal
I get an error 1004, Method 'Range' of object _Global failed. Error 1004 is the general automation error, so I can't get any help on it.
Occasionally, it works.
what is the easiest, most reliable way to sort an Excel spreadsheet from VB code that generates it?
xlSheet.Cells.Sort key1:=Range("A2"
I get an error 1004, Method 'Range' of object _Global failed. Error 1004 is the general automation error, so I can't get any help on it.
Occasionally, it works.
what is the easiest, most reliable way to sort an Excel spreadsheet from VB code that generates it?