Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am trying to identify my currently active sheet name.
If sheets(ActiveSheet) = sheets("first sheet") Then a=1 ElseIf sheets(ActiveSheet) = sheets("second sheet") Then a=2 End If this does not work. I have tried many variations of the first line, but no luck. any ideas? thx |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This should help:
sub Check() MsgBox ActiveSheet.Name MsgBox Sheets(1).Name end sub "mike allen" wrote in message ... I am trying to identify my currently active sheet name. If sheets(ActiveSheet) = sheets("first sheet") Then a=1 ElseIf sheets(ActiveSheet) = sheets("second sheet") Then a=2 End If this does not work. I have tried many variations of the first line, but no luck. any ideas? thx |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Need to identify active worksheet in macro | Excel Worksheet Functions | |||
How to identify active Menu Bars | Excel Discussion (Misc queries) | |||
Active Cell Copy And Paste Sheet to Sheet | New Users to Excel | |||
VBA code to identify last row in a sheet | Excel Discussion (Misc queries) | |||
Identify current active cell | Excel Worksheet Functions |