Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Macro to run when sheet activated

i would just put this code in the trigger sheet code module, then it would only
fire when the trigger sheet is activated or deactivated.

right click the trigger tab and choose view code and paste this there with the
appropriate changes to your sheet names


Private Sub Worksheet_Activate()
Sheets("sheet1").Visible = True
Sheets("sheet2").Visible = True
End Sub

Private Sub Worksheet_Deactivate()
Sheets("sheet1").Visible = False
Sheets("sheet2").Visible = False
End Sub


--


Gary


"JDay01" wrote in message
...
I would like to have certain sheet tabs that are normally hidden in my
workbook to be "unhidden" when I select a specific sheet tab. For example,
let's say I have 3 hidden sheets named A, B, and C. Then, let's say I have
an unhidden sheet called "Trigger", that when I select it, it executes a
macro to unhide sheets A, B, and C. Seems like this should be easy to do
... can someone help?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro to run when sheet activated Dave Miller Excel Programming 1 December 13th 06 09:26 PM
Password prompt when sheet is activated mmc308 Excel Programming 4 November 17th 06 07:25 AM
userform open when sheet activated ADK Excel Programming 11 September 7th 06 06:36 PM
Load VBA on Activated Sheet RigasMinho Excel Programming 2 July 25th 06 04:20 PM
Error sheet when macro's are not activated jgmiddel Excel Programming 0 March 22nd 06 09:28 PM


All times are GMT +1. The time now is 09:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"