dss28
Board Regular
- Joined
- Sep 3, 2020
- Messages
- 165
- Office Version
- 2007
- Platform
- Windows
I have developed a program having userforms all in one size of 450 (height) x 780 (width), userform zoom property set to 85.
I used the following code to autofit the form to users window size. However some portion of the form is not visible and goes out of window which can not be seen.
can we add a scroll bar to the userform or is there any thing wrong in the userform size?
what should be the size of the userform if this code gives perfect window fit?
pl. help.
I used the following code to autofit the form to users window size. However some portion of the form is not visible and goes out of window which can not be seen.
can we add a scroll bar to the userform or is there any thing wrong in the userform size?
what should be the size of the userform if this code gives perfect window fit?
pl. help.
VBA Code:
Private Sub UserForm_Initialize()
With Application
.WindowState = xlMaximized
Zoom = Int(.Width / Me.Width * 100)
Width = .Width
Height = .Height
End With
End Sub