Matching multiple userform height and widths after resizing

  • Thread starter Thread starter melissa
  • Start date Start date
M

melissa

I have added max and min buttons on my userforms and I would like to
make the next userform the same dimensions as the previous form if it
was maximized.
Please help!
thanks
 
If you aare using VBA userform, go to VBAProject and right click the
userform. You can import and export userforms.
 
I have added max and min buttons on my userforms and I would like to
make the next userform the same dimensions as the previous form if it
was maximized.
Please help!
thanks


i already have the userforms set up. after completing one form, it
sends you to a second form. If the first form was maximized, I would
like the next form to automatically have the same height and width as
the maximized form.
 
Not sure what parameters you arre looking for. Below code modifes some of
the windows parameters. You can activate one window, read the values, then
set 2nd window witth same values.

Application Window is the excel window. Active window is the windows inside
the Excel window. If you havve more than one workbook open they both may be
insdie the same excel window.


Sub Macro1()
'
' Macro1 Macro
' Macro recorded 8/22/2007
'

'
Application.WindowState = xlMaximized
Application.WindowState = xlNormal

Application.Width = 200
Application.Height = 150


ActiveWindow.WindowState = xlMaximized
ActiveWindow.WindowState = xlNormal

ActiveWindow.Width = 600
ActiveWindow.Height = 400

End Sub
 

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

Back
Top