L
Larry Fitch
I have created macros assigned to buttons that open and close individual
sheets. Here is an example -
Sheets("Pay Inflation - Biometrics").Visible = Not Sheets("Pay Inflation -
Biometrics").Visible
I have also created macros that are assigned to buttons that open an close
groups of sheets.
Here is an example -
Application.ScreenUpdating = False
Sheets("Statistics").Visible = Not Sheets("Statistics").Visible
Sheets("Direct Cost Savings Breakdown").Visible = Not Sheets("Direct
Cost Savings Breakdown").Visible
Sheets("Pay Inflation - Biometrics").Visible = Not Sheets("Pay Inflation
- Biometrics").Visible
Sheets("OT Reduction").Visible = Not Sheets("OT Reduction").Visible
The problem I have is that if I have opened a single sheet using the button
for that sheet (in the example at top it is the Pay Inflation - Biometrics
sheet) and I then select the button to open the group of sheets, the Pay
Inflation - Biometrics will close since it was opened by the previous macro..
What error checking or other conditional logic can I add so that if a sheet
is already visible it will not be hidden.. ??
sheets. Here is an example -
Sheets("Pay Inflation - Biometrics").Visible = Not Sheets("Pay Inflation -
Biometrics").Visible
I have also created macros that are assigned to buttons that open an close
groups of sheets.
Here is an example -
Application.ScreenUpdating = False
Sheets("Statistics").Visible = Not Sheets("Statistics").Visible
Sheets("Direct Cost Savings Breakdown").Visible = Not Sheets("Direct
Cost Savings Breakdown").Visible
Sheets("Pay Inflation - Biometrics").Visible = Not Sheets("Pay Inflation
- Biometrics").Visible
Sheets("OT Reduction").Visible = Not Sheets("OT Reduction").Visible
The problem I have is that if I have opened a single sheet using the button
for that sheet (in the example at top it is the Pay Inflation - Biometrics
sheet) and I then select the button to open the group of sheets, the Pay
Inflation - Biometrics will close since it was opened by the previous macro..
What error checking or other conditional logic can I add so that if a sheet
is already visible it will not be hidden.. ??