Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I have numerous sheets and I would like to show or hide them based on the month. IE. If it is Jan hide all my other sheets apart from the Jan sheet, this is to stop people seeing the data. I got the following code from an MVP from this site. But I don't know what to do with it. I'm a beginner in Vb so please bear with me!! Dim MyMonth As Integer MyMonth = Month(Now()) Select Case MyMonth Case 1 'If month number is 1 (Jan) Sheets("Feb").Visible = False Sheets("Mar").Visible = False Case 2 'If Month number is 2 (Feb) Sheets("Jan").Visible = False Sheets("March").Visible = False Case 3 'If Month number is 3 (Mar) Sheets("Jan").Visible = False Sheets("Mar").Visible = True Sheets("Feb").Visible = False End Select End Sub The Expert suggested I put this in the Open workbook event??? Where is that please? Thank for reading Natalie |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
hiding zero values on all sheets & by default on new sheets | Excel Worksheet Functions | |||
Hiding sheets | Excel Discussion (Misc queries) | |||
Locking Sheets / Hiding Sheets | Excel Worksheet Functions | |||
Hiding Sheets | Excel Worksheet Functions | |||
Hiding Sheets | Excel Programming |