Hi
I have a list of current staff with a button using a basic macro to sort the list into alphabetical order.
Is there a way to stop the macro activatiing after a certain date/day.
e.g. Week runs Monday to Saturday, The 1st week of the year starts on 1st Monday in April the information can be sorted during the week, after the Saturday the button would have no effect
Sub Sort_drivers()
'
' Sort_drivers Macro
' Macro recorded 29/06/2008 by Jim
'
'
ActiveWindow.SmallScroll Down:=-8
Range("A8:K157").Select
Selection.Sort Key1:=Range("C8"), Order1:=xlAscending, Key2:=Range("B8") _
, Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase:= _
False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal
Range("A159:K178").Select
Selection.Sort Key1:=Range("C159"), Order1:=xlAscending, Key2:=Range( _
"B159"), Order2:=xlAscending, Header:=xlGuess, OrderCustom:=1, MatchCase _
:=False, Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, _
DataOption2:=xlSortNormal
ActiveWindow.SmallScroll Down:=-194
Range("M27").Select
End Sub
Thank you
Bookmarks