ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto_Open/Close Mods (https://www.excelbanter.com/excel-programming/287337-auto_open-close-mods.html)

Phil Hageman[_3_]

Auto_Open/Close Mods
 
The below subs execute when the workbook is
opened/closed. I need to add code to turn off row and
column headings in the Auto_Open, and to restore the
headings in the Auto_Close. If anything else could use
improvement, please suggest. Thanks, Phil

Option Explicit

Sub Auto_Open()
Dim ws As Worksheet

Application.ScreenUpdating = False
Application.DisplayFullScreen = True
For Each ws In Worksheets
If ws.Visible = xlSheetVisible Then
ws.Select
Application.GoTo ws.Range("A1"), True
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayWorkbookTabs = False
End If
Next

Worksheets("Customer").Select
ActiveWindow.Zoom = 62
Worksheets("Financial").Select
ActiveWindow.Zoom = 62
Worksheets("Learning and Growth").Select
ActiveWindow.Zoom = 62
Worksheets("Internal Business Process").Select
ActiveWindow.Zoom = 62
Worksheets("Internal Business Process").Select
ActiveWindow.Zoom = 62


Worksheets("Scorecard").Select
ActiveWindow.Zoom = 62
ThisWorkbook.Colors(7) = RGB(255, 124, 128)

Application.AutoPercentEntry = True
Application.ScreenUpdating = True

End Sub

Sub Auto_Close()
Application.DisplayFullScreen = False
ActiveWindow.DisplayWorkbookTabs = True
End Sub


Tom Ogilvy

Auto_Open/Close Mods
 
Turn on the macro recorder and perform the task manually. Then you will see
the code.

--
Regards,
Tom Ogilvy

"Phil Hageman" wrote in message
...
The below subs execute when the workbook is
opened/closed. I need to add code to turn off row and
column headings in the Auto_Open, and to restore the
headings in the Auto_Close. If anything else could use
improvement, please suggest. Thanks, Phil

Option Explicit

Sub Auto_Open()
Dim ws As Worksheet

Application.ScreenUpdating = False
Application.DisplayFullScreen = True
For Each ws In Worksheets
If ws.Visible = xlSheetVisible Then
ws.Select
Application.GoTo ws.Range("A1"), True
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayWorkbookTabs = False
End If
Next

Worksheets("Customer").Select
ActiveWindow.Zoom = 62
Worksheets("Financial").Select
ActiveWindow.Zoom = 62
Worksheets("Learning and Growth").Select
ActiveWindow.Zoom = 62
Worksheets("Internal Business Process").Select
ActiveWindow.Zoom = 62
Worksheets("Internal Business Process").Select
ActiveWindow.Zoom = 62


Worksheets("Scorecard").Select
ActiveWindow.Zoom = 62
ThisWorkbook.Colors(7) = RGB(255, 124, 128)

Application.AutoPercentEntry = True
Application.ScreenUpdating = True

End Sub

Sub Auto_Close()
Application.DisplayFullScreen = False
ActiveWindow.DisplayWorkbookTabs = True
End Sub




Don Guillett[_4_]

Auto_Open/Close Mods
 
ActiveWindow.DisplayHeadings = False or true

--
Don Guillett
SalesAid Software

"Phil Hageman" wrote in message
...
The below subs execute when the workbook is
opened/closed. I need to add code to turn off row and
column headings in the Auto_Open, and to restore the
headings in the Auto_Close. If anything else could use
improvement, please suggest. Thanks, Phil

Option Explicit

Sub Auto_Open()
Dim ws As Worksheet

Application.ScreenUpdating = False
Application.DisplayFullScreen = True
For Each ws In Worksheets
If ws.Visible = xlSheetVisible Then
ws.Select
Application.GoTo ws.Range("A1"), True
ActiveWindow.DisplayGridlines = False
ActiveWindow.DisplayWorkbookTabs = False
End If
Next

Worksheets("Customer").Select
ActiveWindow.Zoom = 62
Worksheets("Financial").Select
ActiveWindow.Zoom = 62
Worksheets("Learning and Growth").Select
ActiveWindow.Zoom = 62
Worksheets("Internal Business Process").Select
ActiveWindow.Zoom = 62
Worksheets("Internal Business Process").Select
ActiveWindow.Zoom = 62


Worksheets("Scorecard").Select
ActiveWindow.Zoom = 62
ThisWorkbook.Colors(7) = RGB(255, 124, 128)

Application.AutoPercentEntry = True
Application.ScreenUpdating = True

End Sub

Sub Auto_Close()
Application.DisplayFullScreen = False
ActiveWindow.DisplayWorkbookTabs = True
End Sub





All times are GMT +1. The time now is 10:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com