Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How do I add minimize and maximize buttons to a VBA userform?
I have this code that does it, but when I change the caption of the userform the buttons don't work anymore. I am slowly coming to the conclusion that it probably is not worth the trouble and that it is better to make your own buttons. Public Declare Function FindWindow _ Lib "user32" Alias _ "FindWindowA" (ByVal lpClassName As Long, _ ByVal lpWindowName As Long) Private Declare Function SetWindowLong _ Lib "user32" _ Alias "SetWindowLongA" (ByVal hwnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Private Sub UserForm_Initialize() Dim hWnd as Long hWnd = FindWindow(vbNullString, UserForm1.Caption) SetWindowLong hWnd, -16, &H20000 Or &H10000 Or &H84C80080 End Sub RBS |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
minimize and maximize buttons missing | Excel Discussion (Misc queries) | |||
how do i minimize/maximize a workbook from vba? I want to minimize it durring processing to speed things up a bit | Excel Worksheet Functions | |||
Maximize & Minimize where are you ? | Excel Programming | |||
Maximize & Minimize buttons where are they? | Excel Programming | |||
How to get Maximize and Minimize buttons on Userform | Excel Programming |