Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I found this code posted by Chip Pearson on the internet.
Private Const WS_MAXIMIZEBOX = &H10000 Private Const WS_MINIMIZEBOX = &H20000 Private Const GWL_STYLE = (-16) Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" ( _ ByVal HWnd As Long, _ ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" ( _ ByVal HWnd As Long, _ ByVal nIndex As Long, _ ByVal dwNewLong As Long) As Long Sub ShowMinMax(ShowMin As Boolean, ShowMax As Boolean) Dim WinInfo As Long WinInfo = GetWindowLong(Application.HWnd, GWL_STYLE) If ShowMin = True Then WinInfo = WinInfo Or WS_MINIMIZEBOX Else WinInfo = WinInfo And (Not WS_MINIMIZEBOX) End If If ShowMax = True Then WinInfo = WinInfo Or WS_MAXIMIZEBOX Else WinInfo = WinInfo And (Not WS_MAXIMIZEBOX) End If SetWindowLong Application.HWnd, GWL_STYLE, WinInfo End Sub How do I pass a variable to implement the ShowMinMax routine? TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disable Minimize/Maximize button for Excel 2007 Application | Excel Programming | |||
How to show the maximize button | Excel Programming | |||
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 | |||
Minimize/Maximize excel restores command bars | Excel Programming | |||
Maximize minimize and restore button | Excel Programming |