PDA

View Full Version : fullscreen userform



morteza2006
03-11-2015, 03:44 AM
Hi all friends
I am a User Form and ask when it opens in full screen
I am grateful for your guidance.

12987

jonh
03-11-2015, 08:49 AM
Dim xlws As XlWindowState
xlws = Application.WindowState
Application.WindowState = xlMaximized
With UserForm1
.Top = Application.Top
.Left = Application.Left
.Width = Application.Width
.Height = Application.Height
.Show
End With
Application.WindowState = xlws

thangnhoc
07-30-2016, 08:33 AM
And controls fullscreen alow

offensetofu
11-23-2022, 05:58 PM
Tried using TrevorG code:

Private Sub UserForm_Initialize()
With Application
.WindowState = xlMaximized
Me.Top = .Top
Me.Left = .Left
Me.Height = .Height
Me.Width = .Width
End With
End Sub

Keep getting message that use of ME is illegal
Any thoughts?

dinosaur game (https://dinosaur-game.io)

SamT
11-24-2022, 12:09 AM
Use jonh's Code