Userform to Fill Entire Screen

Andry143

New Member
Joined
Oct 15, 2004
Messages
26
I would like my userform to automatically size itself to fill the entire screen. Is this possible? If yes, where are the settings or what initialization code do I need to include?

Thanks for the help.

Jason
 

Some videos you may like

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

onlyadrafter

Well-known Member
Joined
Aug 19, 2003
Messages
5,703
Platform
  1. Windows
Hello,

TO override the position,you need to change StartUpPosition to Manual, and have TOP and LEFT both 0.

Will work on the size, obviously change the WIDTH and HEIGHT as required.

(PS- tks for being my 3000th post!)
 

HalfAce

MrExcel MVP
Joined
Apr 6, 2003
Messages
9,453
I would like my userform to automatically size itself to fill the entire screen. Is this possible?

Hello Jason,
Rather than hard coding the startup position, height & width you can also use this in
the userform's initialize event.
Code:
Private Sub UserForm_Initialize()
With Application
    .WindowState = xlMaximized
    Zoom = Int(.Width / Me.Width * 100)
    Me.Width = .Width
    Me.Height = .Height
End With
End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,114,037
Messages
5,545,667
Members
410,697
Latest member
srishtijain0708
Top