Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro issue in XL03 "Compatability Mode"
In xl2000 the closest to your code is:
ActiveWorkbook.Worksheets("Exec Summary").Range("K5:K41").Sort _ Key1:=Range("K5"), _ Order1:=xlAscending The full parameter list is key1, Order1 As xlSortOrder, Key2, Order2, Key3, Order3, Header As xlYesNoGuess, OrderCustom, MatchCase, Orientation As xlSortRows, SortMethod As xlSortMethod I'm not sure if there were any changes between xl2000 and xl2003. You could check what version of xl is running using Application.Version Regards, Andrew On 31 Aug, 12:03, Ray wrote: Hi - Using XL07 in Compatability Mode, I've created what I *thought* was a relatively simple procedure to sort a range based on a user-selected cell. *For example, if user clicks on cell D3, the range A4:Z50 is sorted based on values in column D. The procedure ran fine on my computer, but when a native XL03 user clicks on a 'header' (in row 3), the procedure throws an error: Compile Error: *Variable Not Defined with SortOn:=xlSortOnValues highlighted as the error. The whole line is: ActiveWorkbook.Worksheets("Exec Summary").Sort.SortFields.Add Key:=Range( _ * * * * * * * * "K5:K41"), SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _ * * * * * * * * xlSortNormal Is 'xlSortOnValues' referencing an Object Library that's not available by Default? *Can I programmatically check for it (on the user's machine) and activate if not already available? Any help is greatly appreciated! Thanks, ray |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to have a macro simply issue the "find" command or "control f: | Excel Programming | |||
"compatability mode" this is slowing things, how to fix | Excel Discussion (Misc queries) | |||
Switch between Design Mode and "Running" Mode | Excel Programming | |||
Mkae Mode function return "" instead of #N/A when there is no Mode | Excel Discussion (Misc queries) | |||
Make "Edit" mode default, rather than "Enter"? | Excel Discussion (Misc queries) |