P
Pat
Can anyone explain why a macro will run via Tools but when the macro is
copied and pasted into a command button it runs into trouble. When the code
gets to
"Sheets("Sheet2").Select" it hangs at "Range("AG77").Select"
Thanks if you know what the problem is.
Private Sub Sort_Click()
Range("A9:Z716").Select
Selection.Sort Key1:=Range("D9"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("D9").Select
Sheets("Sheet2").Select
Range("AG77").Select
cont.......
copied and pasted into a command button it runs into trouble. When the code
gets to
"Sheets("Sheet2").Select" it hangs at "Range("AG77").Select"
Thanks if you know what the problem is.
Private Sub Sort_Click()
Range("A9:Z716").Select
Selection.Sort Key1:=Range("D9"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
Range("D9").Select
Sheets("Sheet2").Select
Range("AG77").Select
cont.......