if activeworksheet.name="April" then
do this
else
do that
end if
Or instead of selecting, just do what you need to do for sheet2(Jan) to
sheet13(Dec)
Sub dorestofsheets()
'MsgBox ActiveSheet.Index
For i = ActiveSheet.Index To 13
Sheets(i).Range("a1") = 1
Next i
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"ordnance1" <(E-Mail Removed)> wrote in message
news:98E102AB-861E-4C28-AB8C-(E-Mail Removed)...
> My problem here is of course in line 1. I need the code to run based on
> what worksheet is active. There will be a series of these if statements
> (if May is active I will select May - September and so on). So is there
> any way to write the first line to determine the active worksheet?
>
>
> Sub Macro2()
>
> If Worksheets("April").Active = True Then
>
> Sheets(Array("April", "May", "June", "July", "August",
> "September")).Select
>
> End If
>
> End Sub