![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Hi,
I have a part number cross reference spreadsheet in XL97 that is in continual use during the work day. It contains around 3000 entries. When opened, the userform is displayed and the user can obtain the appropriate cross reference. To keep it readily available, there is a 'Hide' button that hides the userform and minimizes the spreadsheet to the tray to keep it readily available. Is it possible to create a macro to automatically show the userform when the spreadsheet is maximized from the tray by clicking its icon? Thanks for any suggestions that you may have. Garbo |
|
|
|
|
|
#2 |
|
BatCoder
Join Date: Feb 2002
Location: Turkey
Posts: 764
|
In Thisworkbook object:
Private Sub Workbook_Activate() UserForm.Show End Sub I hope it works for you. regards |
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Smozgur,
No luck. It would seem that the workbook is already activated and is simply minimized to the tray. Nonetheless, thank you for your response. I do appreciate you taking the time. |
|
|
|
|
|
#4 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Garbo
Try this Private Sub Workbook_WindowResize(ByVal Wn As Window) If ActiveWindow.WindowState = xlMaximized Then UserForm1.Show End If End Sub |
|
|
|
|
|
#5 |
|
New Member
Join Date: Apr 2002
Posts: 3
|
Dave,
Thanks for your reply. I have followed your posts for a long time, and have learned a great deal from your offerings. I tried your suggestion, which appears to be the solution , but it still does not show the form when maximized from the tray. It appears that I may just have to live with using a cmd button to show the form. Thanks again. Garbo |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
Hey Garbo
I tried everything I could. It seems that these events will only fire if the workbook itself is minimized, not Excel as the application itself. I'll see if there is an API routine if I get extremely bored. Ha Ha Tom |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|