Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
force users to enable macro so sheet cannot be printed | Excel Discussion (Misc queries) | |||
Auto force a macro | Excel Discussion (Misc queries) | |||
Force read-only in auto_open macro | Excel Discussion (Misc queries) | |||
Force Tab | Excel Worksheet Functions | |||
How do I force an Excel macro to ask me which file and directory? | Excel Discussion (Misc queries) |