P
Phil H
How would this Autpen Sub be modified to do this:
If macro security is set to “Very High†or “High,†open worksheet named
“Macro Securityâ€
Else, open on worksheet “REP003.â€
Sub Auto_open()
'This code establishes the protocol for on-screen views and features.
Dim WS As Worksheet
Application.ScreenUpdating = False
Application.DisplayFullScreen = True
Application.EnableEvents = False
For Each WS In ThisWorkbook.Worksheets
If WS.Visible = xlSheetVisible Then
WS.Select
Application.Goto WS.Range("A1"), True
ActiveWindow.Zoom = 85
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.WindowState = xlMaximized
ActiveWindow.View = xlNormalView
End If
Next
ThisWorkbook.Worksheets("REP003").Select
Application.Goto Reference:=Range("A100"), Scroll:=False
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
If macro security is set to “Very High†or “High,†open worksheet named
“Macro Securityâ€
Else, open on worksheet “REP003.â€
Sub Auto_open()
'This code establishes the protocol for on-screen views and features.
Dim WS As Worksheet
Application.ScreenUpdating = False
Application.DisplayFullScreen = True
Application.EnableEvents = False
For Each WS In ThisWorkbook.Worksheets
If WS.Visible = xlSheetVisible Then
WS.Select
Application.Goto WS.Range("A1"), True
ActiveWindow.Zoom = 85
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayWorkbookTabs = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.WindowState = xlMaximized
ActiveWindow.View = xlNormalView
End If
Next
ThisWorkbook.Worksheets("REP003").Select
Application.Goto Reference:=Range("A100"), Scroll:=False
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub