Greetings
Welcome to the forum; I am sure you'll be glad you joined, as there are some great folks here who are very helpful!
Originally Posted by
pushtheriver
...The last is for unhiding .
I have been able to get it to work for one sheet but not two....
I didn't test with setting visibility to True, but let's use the supplied Constants. I didn't have any problem with...
ThisWorkbook Module:
Option Explicit
Private Sub WorkBook_Open()
If Date >= DateSerial(2010, 9, 30) Then
Call Hidesheets
ThisWorkbook.Save
End If
End Sub
Standard Module:
Option Explicit
Function Hidesheets()
Worksheets("Receipts").Visible = xlSheetVeryHidden
Worksheets("Payments").Visible = xlSheetVeryHidden
End Function
Function ShowSheets()
Worksheets("Receipts").Visible = xlSheetVisible
Worksheets("Payments").Visible = xlSheetVisible
End Function
Note that you can certainly leave the above two as Subs, I just changed to Functions so that they won't display to the user in the macro dialog box.
Hope that helps,
Mark