Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Macro When Specific Sheet Selected
Can someone tell me the code to run a macro when a specific sheet is first
selected? I need it to have a text box appear momentarily when the user selects the sheet. Thanks in advance. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Macro When Specific Sheet Selected
right click sheet tabview codeleft window select worksheetright window
select activate. -- Don Guillett Microsoft MVP Excel SalesAid Software "Carl" wrote in message ... Can someone tell me the code to run a macro when a specific sheet is first selected? I need it to have a text box appear momentarily when the user selects the sheet. Thanks in advance. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Macro When Specific Sheet Selected
Carl
You can use a Worksheet_Activate() event like so Private Sub Worksheet_Activate() MsgBox "You activated sheet " & Me.Name End Sub To implement just right click on the sheet tab and select View Code. Paste in the resulting window and save. Now when you activate that sheet the msgbox will pop up -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.nickhodge.co.uk UK Excel User Conference In Cambridge November 28th - December 1st 2007 Register Now @ http://www.exceluserconference.com/UKEUC.html "Carl" wrote in message ... Can someone tell me the code to run a macro when a specific sheet is first selected? I need it to have a text box appear momentarily when the user selects the sheet. Thanks in advance. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Run Macro When Specific Sheet Selected
Thanks. Worked perfectly!
"Nick Hodge" wrote: Carl You can use a Worksheet_Activate() event like so Private Sub Worksheet_Activate() MsgBox "You activated sheet " & Me.Name End Sub To implement just right click on the sheet tab and select View Code. Paste in the resulting window and save. Now when you activate that sheet the msgbox will pop up -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.nickhodge.co.uk UK Excel User Conference In Cambridge November 28th - December 1st 2007 Register Now @ http://www.exceluserconference.com/UKEUC.html "Carl" wrote in message ... Can someone tell me the code to run a macro when a specific sheet is first selected? I need it to have a text box appear momentarily when the user selects the sheet. Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to run specific macro on selected worksheet? | Excel Discussion (Misc queries) | |||
Macro to delete specific rows above selected cell | Excel Programming | |||
Specific cell selected when sheet opens...how??? | Excel Discussion (Misc queries) | |||
Macro to move selected cell contents to a specific column on same row | Excel Programming | |||
Execute a Macro when specific value is selected in a Range | Excel Programming |