View Full Version : Solved: maximize user form on open
gibbo1715
10-31-2006, 12:13 PM
Hi Again all
Can anyone tell me how i can maximize a userform when opened please
thanks
Gibbo
mdmackillop
10-31-2006, 12:25 PM
Put this in your Userform code
Option Explicit
Private ScrWidth&, ScrHeight&
Private Declare Function GetSystemMetrics32 Lib "User32" _
Alias "GetSystemMetrics" (ByVal nIndex&) As Long
Private Sub UserForm_Initialize()
Dim Factor As Single
Factor = 0.75 'adjust to suit
Me.Width = GetSystemMetrics32(0) * Factor '< in pixels
Me.Height = GetSystemMetrics32(1) * Factor
End Sub
gibbo1715
10-31-2006, 12:45 PM
thanks once again
gibbo
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.