anyone already have the worksheet centering code that works no matter what the monitor size - that would be willing to share?
Sub Window_Mid()
Dim shW#, maxW#
Application.ScreenUpdating = False
With ActiveWindow
.WindowState = xlMaximized
maxW = Application.Width
.WindowState = xlNormal
shW = Application.Width
.Top = 20
.Left = (maxW - shW) / 2
End With
End Sub
Also want to lock current worksheet size (make current size the full screen size)
I want to make the current worksheet size the "Fullscreen" Size. So Not sure if I am looking for code to eliminate the fullscreen click (top right corner) or just to change the "fullscreen" option to set the worksheet size to a specific width and height.
Sub Window_Mid()
Dim shW#, maxW#
Application.ScreenUpdating = False
With ActiveWindow
.WindowState = xlMaximized
maxW = Application.Width
.WindowState = xlNormal
shW = Application.Width
.Top = 20
.Left = (maxW - shW) / 2
ActiveWindow.ScrollRow = 1
ActiveWindow.ScrollColumn = 1
End With
End Sub
Code readily available here : https://www.google.com.hk/search?q=....69i57j0l5.30365j1j8&sourceid=chrome&ie=UTF-8Still looking for the code to set the Worksheet Size to Exactly 1452 X 792
Sub Window_Mid()
Dim shW#, maxW#
With Application
.ScreenUpdating = False
With .ActiveWindow
[COLOR=#ff0000] .Width = 1450[/COLOR]
[COLOR=#ff0000] .Height = 792[/COLOR]
.WindowState = xlMaximized
maxW = .Width
.WindowState = xlNormal
shW = .Width
.Top = 20
.Left = (maxW - shW) / 2
.ScrollRow = 1
.ScrollColumn = 1
End With
.ScreenUpdating = False
End With
End Sub
Sub Window_Mid()
Dim maxW#, maxH#
With Application
.ScreenUpdating = False
With .ActiveWindow
.Width = 1450
.Height = 792
.WindowState = xlMaximized
maxW = .Width
maxH = .Height
.WindowState = xlNormal
.Top = (maxH - .Height) / 2
.Left = (maxW - .Width) / 2
.ScrollRow = 1
.ScrollColumn = 1
End With
.ScreenUpdating = False
End With
End Sub