Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

UserForm fixed settings (Width, Height)

21 views
Skip to first unread message

jmsla...@gmail.com

unread,
Nov 18, 2021, 10:30:16 AM11/18/21
to
Hoi :)

I'm struggling with an "UserForm1" when it opens and it explosed to a maximum size. Strange because in the past that problem wasn't there.

Is there a simple part of code like;

Sub xxx
UserForm1.Height=400
UserForm1.Width=700
End sub

which set those two settings at the fixed size.
Should be nice, because..... it makes me crazy :)

regards, Johan

Claus Busch

unread,
Nov 18, 2021, 11:22:08 AM11/18/21
to
Hi Johan,
if you want a fixed size, set the measures into the properties of the
userform.
Otherwise you can set the size when initializing the userform:

Private Sub UserForm_Initialize()
With UserForm1
.Height = 400
.Width = 700
End With
End Sub


Regards
Claus B.
--
Windows10
Microsoft 365 for business

jmsla...@gmail.com

unread,
Nov 18, 2021, 11:57:13 AM11/18/21
to
-------------------------------
Hi Claus,

Super. Problem solved with your code.
regards,
Johan.
-------------------------------
0 new messages