Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I created a Macro that works fine but when I try to use the code with a
command button it fails to sort - "The sort reference is not valid. Make sure that it's within the data you want to sort, and the first Sort box isn't the same or blank". Private Sub cmdCopyList_MTN3_Click() Application.Goto Reference:="List_MTN2" Selection.Copy Application.Goto Reference:="List_MTN3" ActiveSheet.Paste Application.CutCopyMode = False Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom Selection.Copy Application.Goto Reference:="List_MTN2" End Sub Thanks for your help! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro Does not Work on Button | Excel Worksheet Functions | |||
Button suddenly does not work | New Users to Excel | |||
Spin button in a work sheet - how do I make it work? | Excel Worksheet Functions | |||
Button doesn't work | Excel Programming | |||
Redo button does not work | Excel Discussion (Misc queries) |