LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default VBA - need to minimize Excel from UserForm

Hi gary,
Private Declare Function IsIconic& Lib "user32" (ByVal hWnd&)

Private Sub UserForm_Resize()
Dim s&: s = Application.WindowState
Dim h&: h = FindWindow(vbNullString, Application.Caption)
If IsIconic(hWnd) Then
Application.WindowState = xlMinimized
Else
Application.WindowState = s
End If
End Sub

MP

"gary" a écrit dans le message de news:
...
I have a VBA application that displays a UserForm that has a Minimize
button
on it. When I click it, the UserForm minimizes as it should but the Excel
workbook that contains the UserForm does not. I can not even click on the
minimize button on the workbook because it is grayed out (I think because
the
UserForm has focus).

How do I make the Excel workbook that contains the UserForm that was
launched also minimize when I minimize the UserForm?

Thanks,

Gary



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimize button on userform? Bob Excel Discussion (Misc queries) 3 June 13th 09 11:01 PM
Minimize UserForm Howard31 Excel Discussion (Misc queries) 0 December 17th 08 09:10 PM
USERFORM DISAPPEARS ON EXCEL MINIMIZE Ian Digby[_3_] Excel Programming 2 January 25th 06 08:50 AM
Minimize a UserForm SailFL Excel Discussion (Misc queries) 1 August 21st 05 12:45 AM
How to minimize a userform! furbiuzzu Excel Programming 4 June 15th 05 07:46 PM


All times are GMT +1. The time now is 09:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"