Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Hide sheets using vba

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PJ - 23 Sep 2006 10:54 GMT
Hi all

I have a sheet initally hidden(Contact) and the rest visiable, what I am
trying to do is when today() = 1-11-06 it automatically unhides the Contact
sheet and hides all the rest.

I am trying to do it with having a button assigned to a macro - Having no
luck...

Any help welcome.

Thanks
Paul

tried...
Sheets("Menu").Range ("A1") >= "01/11/2006"
GoTo hide
Sub hide()
Run
   Sheets(Array("Health Dec", "Menu", "UK", "EU", "XU", "WW", "AT EU", "AT
WW", "Summary") _
       ).Select
   Sheets("Health Dec").Activate
   ActiveWindow.SelectedSheets.Visible = False
   Sheets("Contact").Visible = True
   Sheets("Long stay").Select
   ActiveWindow.SelectedSheets.Visible = False
End Sub
PJ - 23 Sep 2006 10:59 GMT
Sorry - Trying to do it WITHOUT using a macro button.

> Hi all
>
[quoted text clipped - 24 lines]
>    ActiveWindow.SelectedSheets.Visible = False
> End Sub
PJ - 23 Sep 2006 11:31 GMT
Sussed it...with

Private Sub Workbook_Open()
If Sheets("Menu").Range("A1") >= "01/11/2006" Then
   Sheets(Array("Health Dec", "Menu", "UK", "EU", "XU", "WW", "AT EU", "AT
WW", "Summary") _
       ).Select
   Sheets("Health Dec").Activate
   ActiveWindow.SelectedSheets.Visible = False
   Sheets("Contact").Visible = True
   Sheets("Long stay").Select
   ActiveWindow.SelectedSheets.Visible = False
End If
End Sub

> Sorry - Trying to do it WITHOUT using a macro button.
>
[quoted text clipped - 26 lines]
>>    ActiveWindow.SelectedSheets.Visible = False
>> End Sub
Óã¸É - 23 Sep 2006 11:41 GMT
Sub yqr()
For Each aaa In ActiveWorkbook.Worksheets
If aaa.Name <> "Contact" Then aaa.Visible = False
Next
End Sub

> Hi all
>
[quoted text clipped - 24 lines]
>     ActiveWindow.SelectedSheets.Visible = False
> End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.