Screen size

J

Jim

Is there a way to have vb code (in Excel) determine the screensize /
resolution of the
computer used to view it. I have a spreadsheet that has custom userforms
that I have lined up along the right side on my screen, but when it opens
on another persons computer (with a narrower screen) the forms are cut off.
Is there a way to determine what the size of the actual display area is
(both width and height) so that I can adjust the positioning of the
userforms that I use.


Always find excellent answers in this group, I appreciate the help.

Jim
 
G

gazornenplat

Don't think you can get the resolution but you can (optionally) maximiz
Excel, maximize the active pane and then get the number of point
available. You can then use *that* to set column widths & heighs, an
pick a font size to fit

EG


Application.WindowState = xlMaximized
With ActiveWindow
.WindowState = xlMaximized
MsgBox .Width
End With

Ga
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top