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: 24
Default unhiding / hiding sheets

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.. ??
--
Thanks

Larry
 
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 / Unhiding Sheets Larry Fitch Excel Discussion (Misc queries) 1 December 2nd 09 02:42 PM
Hiding and Unhiding Sheets Rob Excel Programming 2 January 13th 06 02:32 PM
Hiding and unhiding sheets D.Hay Excel Discussion (Misc queries) 2 December 10th 05 03:59 PM
Hiding/Unhiding multiple sheets in VBA? Simon Lloyd[_660_] Excel Programming 2 November 14th 05 10:57 AM
Hiding and Unhiding work sheets Frank[_19_] Excel Programming 3 November 19th 03 11:27 PM


All times are GMT +1. The time now is 02:18 AM.

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"