WisdomandLaughter
New Member
- Joined
- May 28, 2008
- Messages
- 35
This may be a fairly simple matter for someone well versed in VBA code, however it would take me days to figure out.
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
ffice
ffice" /><o
> </o
>
I pulled some code off the internet to “force” users to enable macros by hiding all sheets except a “Welcome Page”. It works great except that it also unhides sheets that are meant to be hidden by when the workbook is opened.
<o
> </o
>
How would I adjust the following code so any sheets/ tabs containing the words “New Project” are not automatically unhidden? Below is the code pertaining to unhiding. I did not paste the code in its entirety as it is fairly long.
<o
> </o
>
Option Explicit<o
></o
>
<o
></o
>
Const WelcomePage = "Macros"
<o
> </o
>
Private Sub ShowAllSheets()<o
></o
>
Dim ws As Worksheet<o
></o
>
<o
></o
>
For Each ws In ThisWorkbook.Worksheets<o
></o
>
If Not ws.Name = WelcomePage Then ws.Visible = xlSheetVisible<o
></o
>
Next ws<o
></o
>
<o
></o
>
Worksheets(WelcomePage).Visible = xlSheetVeryHidden<o
></o
>
End Sub<o
></o
>
<o
> </o
>
<o
> </o
>
Thank you for your help!!!
<o
> </o
>
Judy
<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com
I pulled some code off the internet to “force” users to enable macros by hiding all sheets except a “Welcome Page”. It works great except that it also unhides sheets that are meant to be hidden by when the workbook is opened.
<o
How would I adjust the following code so any sheets/ tabs containing the words “New Project” are not automatically unhidden? Below is the code pertaining to unhiding. I did not paste the code in its entirety as it is fairly long.
<o
Option Explicit<o
<o
Const WelcomePage = "Macros"
<HR align=center width="100%" SIZE=2>
Private Sub ShowAllSheets()<o
Dim ws As Worksheet<o
<o
For Each ws In ThisWorkbook.Worksheets<o
If Not ws.Name = WelcomePage Then ws.Visible = xlSheetVisible<o
Next ws<o
<o
Worksheets(WelcomePage).Visible = xlSheetVeryHidden<o
End Sub<o
<o
<o
Thank you for your help!!!
<o
Judy