Good people over there.
Does anyone know if it is possible in full screen mode to align visible columns in the middle of the screen? (Rest of the columns are hidden). In other words like it works in “Word”, in full screen mode under “view options” if you select “Show one page” the page is aligned in the centre of the screen.
I’m using the following VBA code to open the workbook in full screen mode.
Any suggestions to modify this code to result alignment in the centre of the screen is appreciated
Private Sub Workbook_Open()
Sheets("sheet1").Select
Set myRange = ActiveSheet
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = Not Application.DisplayStatusBar
ActiveWindow.DisplayWorkbookTabs = True
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Set wbBook = ThisWorkbook
For Each wsSheet In wbBook.Worksheets
Rem If Not wsSheet.Name = "Blank" Then wsSheet.Activate
With ActiveWindow
.DisplayHeadings = False
.DisplayGridlines = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFormattingRows:=True
ActiveSheet.EnableSelection = xlUnlockedCells
End With
Next wsSheet
myRange.Select
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set myRange = ActiveSheet
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWindow.DisplayWorkbookTabs = True
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Set wbBook = ThisWorkbook
End Sub
Thanks in advance
Does anyone know if it is possible in full screen mode to align visible columns in the middle of the screen? (Rest of the columns are hidden). In other words like it works in “Word”, in full screen mode under “view options” if you select “Show one page” the page is aligned in the centre of the screen.
I’m using the following VBA code to open the workbook in full screen mode.
Any suggestions to modify this code to result alignment in the centre of the screen is appreciated
Private Sub Workbook_Open()
Sheets("sheet1").Select
Set myRange = ActiveSheet
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = Not Application.DisplayStatusBar
ActiveWindow.DisplayWorkbookTabs = True
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Set wbBook = ThisWorkbook
For Each wsSheet In wbBook.Worksheets
Rem If Not wsSheet.Name = "Blank" Then wsSheet.Activate
With ActiveWindow
.DisplayHeadings = False
.DisplayGridlines = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, AllowFormattingRows:=True
ActiveSheet.EnableSelection = xlUnlockedCells
End With
Next wsSheet
myRange.Select
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Set myRange = ActiveSheet
Application.ScreenUpdating = False
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",True)"
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
ActiveWindow.DisplayWorkbookTabs = True
Dim wbBook As Workbook
Dim wsSheet As Worksheet
Set wbBook = ThisWorkbook
End Sub
Thanks in advance