LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Hiding sheets

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
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
hiding zero values on all sheets & by default on new sheets WiFiMike2006 Excel Worksheet Functions 4 January 19th 07 08:13 PM
Hiding sheets phil2006 Excel Discussion (Misc queries) 4 August 15th 06 07:20 PM
Locking Sheets / Hiding Sheets Lee Harris Excel Worksheet Functions 4 November 29th 05 07:21 AM
Hiding Sheets Rain Excel Worksheet Functions 10 January 18th 05 08:11 PM
Hiding Sheets Eric[_14_] Excel Programming 4 November 26th 03 06:38 PM


All times are GMT +1. The time now is 01:51 PM.

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

About Us

"It's about Microsoft Excel"