hi.
I am using macros that hide menu and toolbars ; the problem is that when I run the macros in all open workbooks are hidden menus and toolbars . Instead the macro should run only for the workbook where it is performed . How can I do to solve this problem?
These are macros that use :
Thank you.
I am using macros that hide menu and toolbars ; the problem is that when I run the macros in all open workbooks are hidden menus and toolbars . Instead the macro should run only for the workbook where it is performed . How can I do to solve this problem?
These are macros that use :
Code:
Sub All_Sheets_on()
Dim sht As Worksheet
For Each sht In ThisWorkbook.Worksheets
Application.ScreenUpdating = False
Application.DisplayScrollBars = False
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayGridlines = False
Application.DisplayFullScreen = True
Application.DisplayStatusBar = False
Application.WindowState = xlMaximized
ActiveWindow.WindowState = xlMaximized
Application.ScreenUpdating = True
Next
End Sub
Code:
Sub All_Sheets_off()
Dim sht As Worksheet
For Each sht In ThisWorkbook.Worksheets
Application.ScreenUpdating = False
Application.DisplayScrollBars = True
Application.DisplayFormulaBar = True
ActiveWindow.View = xlNormalView
ActiveWindow.DisplayHeadings = True
ActiveWindow.DisplayGridlines = True
Application.DisplayStatusBar = True
ActiveWindow.DisplayHorizontalScrollBar = True
ActiveWindow.DisplayVerticalScrollBar = True
Application.DisplayFullScreen = False
Application.ScreenUpdating = True
Next
End Sub
Thank you.