ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Resizing Userform to screen size (https://www.excelbanter.com/excel-programming/350485-resizing-userform-screen-size.html)

Al@n

Resizing Userform to screen size
 
Hi.
Please can someone tell me if it's possible, in the userform.initialize
module to resize the userform to whatever screen size the macro is being run
on. I have managed this with word macros but have little or no experience
with Excel.

Tia
Al@n

)
remove 2 x @



Norman Jones

Resizing Userform to screen size
 
Hi Alan,

Try:

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


---
Regards,
Norman


"Al@n" <al@n@g@wsi wrote in message
...
Hi.
Please can someone tell me if it's possible, in the userform.initialize
module to resize the userform to whatever screen size the macro is being
run on. I have managed this with word macros but have little or no
experience with Excel.

Tia
Al@n

)
remove 2 x @




Al@n

Resizing Userform to screen size
 
Norman
Thanks for the reply..a logical way of doing it.

I was trying to asseess the horizontal and vertical resolution of the screen
in question and designing a form to those dimensions.

I will see what I can do with your code

Thanks again.

Al@n

--

"Norman Jones" wrote in message
...
Hi Alan,

Try:

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


---
Regards,
Norman


"Al@n" <al@n@g@wsi wrote in message
...
Hi.
Please can someone tell me if it's possible, in the userform.initialize
module to resize the userform to whatever screen size the macro is being
run on. I have managed this with word macros but have little or no
experience with Excel.

Tia
Al@n

)
remove 2 x @







All times are GMT +1. The time now is 12:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com