Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I was having the same problem trying to sort a data table that is stored in
an add-in. I think that William Benson is on the right track. This worked for me...each time that you refer to the range, you need to define the worksheet. ExcelAppRecipe.Selection.Sort Key1:=ExcelAppRecipe.Range("B5"), Order1:=xlAscending "marshy26" wrote: Thanks for the replies. I've tried both solutions that have been suggested but I'm still having problems? What I have noticed is, if I create a macro in excel to do the sort and then add the following line it works. ExcelAppRecipe.Application.Run "'Theale SH Recipe.xls'!Sort_ID" I don't really want to do it this way and would rather go down the route i was going if it is possible? I've done a few searches on the net and have tried various ways of using the sort command but I'm still getting error 1004 :o( Thanks once again |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
programming command bars | Excel Discussion (Misc queries) | |||
Counting, command button and programming in VB | Excel Discussion (Misc queries) | |||
Programming a "Save as..." command button within Excel | Excel Discussion (Misc queries) | |||
Sort command does not sort some columns? | New Users to Excel | |||
Programming command button to execute on a different worksheet | Excel Programming |