R
Ross
I created a series of macros that sort my spreadsheet by a different column
heads as needed, and assigned them to buttons, so I can sort by those
column when I want to by just clicking. It works fine, until I go and do
something else in the sheet, like highlight a range of data for printing.
After that, the macro fails and when I click debug, Below is one of the
macros
that sorts the column headed by names (names is in A1)Any ideas what I can
do to fix this? Thanks in advance.
Ross
Sub sortnames()
'
' sortnames Macro
' Macro recorded 9/14/2005 by ross D
'
'
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
When the macro failed, the entire macro starting with "Selection.Sort Key 1
.. . ." was highlighted
in yellow.
heads as needed, and assigned them to buttons, so I can sort by those
column when I want to by just clicking. It works fine, until I go and do
something else in the sheet, like highlight a range of data for printing.
After that, the macro fails and when I click debug, Below is one of the
macros
that sorts the column headed by names (names is in A1)Any ideas what I can
do to fix this? Thanks in advance.
Ross
Sub sortnames()
'
' sortnames Macro
' Macro recorded 9/14/2005 by ross D
'
'
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
When the macro failed, the entire macro starting with "Selection.Sort Key 1
.. . ." was highlighted
in yellow.