MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Resize the form window to cover the entire desktop?

  Asked By: Maddison    Date: Mar 11    Category: MS Office    Views: 2459

Does anyone know how to resize the form window to fit the desktop of
any given resolution? Also, is it possible to dynamically add scroll
bars(vertical, horizontal) to cover the form based on the resolution?



4 Answers Found

Answer #1    Answered By: Ibtihaj Akhtar     Answered On: Mar 11

Look at the properties window  in the development environment. There are
scroll bars there.

I don't think you can maximise a form. So you'll need to find the window
resolution and resize  the form. The size of the underlying sheet can be
retrieved (don't remember how, but a Google search will find it).

Answer #2    Answered By: Leonardo Costa     Answered On: Mar 11

I think I found how to get the scrren resolution. Do you know what is
the vba code to have the form  resized?

Answer #3    Answered By: Camille Garrett     Answered On: Mar 11

I think the form  has width and height properties that you set, plus left and
top properties to position it - like all the other controls. All the
information is available through the help and/or Google searches.

Answer #4    Answered By: Olivia Campbell     Answered On: Mar 11

Thanks, I've found some code on google and tried it out. Works some
what. It does enlarge based  on the resolution  but it doesn't lock
in to the display like when you maximize a window  but it works for

Private Sub UserForm_Initialize()

'Set the window size to maximum
Application.WindowState = xlMaximized
frmVA.Width = Application.Width
frmVA.Height = Application.Height

Didn't find what you were looking for? Find more on Resize the form window to cover the entire desktop? Or get search suggestion and latest updates.