Maximize Userform

H

Howard31

Hi All,

I've written the following in the Innitialize Userform event to have a
Maximize button on the Userform.

Style = GetWindowLong(hWnd, GWL_STYLE)
Style = Style Or WS_MAXIMIZEBOX Or WS_MINIMIZEBOX Or WS_SYSMENUE Or
WS_CAPTION
SetWindowLong hWnd, GWL_STYLE, Style

My question now is how to tell VBA to open the userform in Maximize Mode?
 
M

Mike H

Hi,

You could try this

With Me
.Height = Application.UsableHeight
.Width = Application.UsableWidth
.Left = 0
.Top = 0
End With

Mike
 

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