I run on a wide screen 22? monitor (1680 x 1050). More than once I’ve delivered a prototype to the customer, and they’ve needed to scroll to find all the buttons, because their monitor was smaller than mine.
Here is a procedure for resizing the Excel Application to a specified dimension (measured in pixels).
Now I can develop on my screen, knowing what it will look like on the customers.
Const SM_CXSCREEN = 0, SM_CYSCREEN = 1
Const cDesiredWidth = 1280, cDesiredHeight = 1024
Dim lngSystemWidth As Long, lngSystemHeight As Long
Dim dblWidthRatio As Double, dblHeightRatio As Double
Dim dblWidth As Double, dblHeight As Double
Dim dblLeft As Double, dblTop As Double
Application.WindowState = xlMaximized
lngSystemWidth = GetSystemMetrics(SM_CXSCREEN)
lngSystemHeight = GetSystemMetrics(SM_CYSCREEN)
dblWidthRatio = Application.Width / lngSystemWidth
dblHeightRatio = Application.Height / lngSystemHeight
dblWidth = cDesiredWidth * dblWidthRatio
dblHeight = cDesiredHeight * dblHeightRatio
dblLeft = (Application.Width – dblWidth) / 2
dblTop = (Application.Height – dblHeight) / 2
Application.WindowState = xlNormal
Application.Width = dblWidth
Application.Height = dblHeight
Application.Left = dblLeft
Application.Top = dblTop
Simply change the constants cDesiredWidth and cDesiredHeight to the target screen resolution.
Note: It’s an approximate resize – it resizes to a few pixels wider than it should.