#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 125
Default Force Macro

Hi

Just a query. Got the following force macro off this forum. when the macro
is not enabled, the "warning" sheet is visible, plusall the graph sheets i
have in the workbook. The data sheets are hidden

FYI - there are other macro for enabling grouping.(not sure if relevant)

can the graphs also be hidden?

regards

Brian

Private Sub Workbook_Open()
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
Sheets(i).Visible = True
Next i
Sheets("Warning").Visible = xlVeryHidden
Application.ScreenUpdating = True
End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.ScreenUpdating = False
For i = 1 To Worksheets.Count
Sheets("Warning").Visible = True
If Sheets(i).Visible = True And Sheets(i).Name < "Warning" Then
Sheets(i).Visible = xlVeryHidden
End If
Next i
Application.DisplayAlerts = False
ActiveWorkbook.Save
End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...excel/200906/1

Reply
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
force users to enable macro so sheet cannot be printed Zambian Excel Discussion (Misc queries) 3 December 10th 08 07:36 PM
Auto force a macro Jase Excel Discussion (Misc queries) 3 October 27th 08 03:12 PM
Force read-only in auto_open macro hhalle Excel Discussion (Misc queries) 0 August 20th 06 10:44 AM
Force Tab Jamie Excel Worksheet Functions 5 February 2nd 05 12:35 AM
How do I force an Excel macro to ask me which file and directory? Ramius Excel Discussion (Misc queries) 4 January 14th 05 03:26 PM


All times are GMT +1. The time now is 05:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"