Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 6 of 6

Thread: Show userform upon maximizing from tray

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #2
    BatCoder
    Join Date
    Feb 2002
    Location
    Turkey
    Posts
    813
    Post Thanks / Like
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Default

    In Thisworkbook object:

    Private Sub Workbook_Activate()
    UserForm.Show
    End Sub

    I hope it works for you.
    regards
    Suat

  3. #3
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #4
    Rest in Peace
    Join Date
    Feb 2002
    Posts
    1,582
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hi Garbo

    Try this

    Private Sub Workbook_WindowResize(ByVal Wn As Window)

    If ActiveWindow.WindowState = xlMaximized Then
    UserForm1.Show
    End If

    End Sub

  5. #5
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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. #6
    Board Regular
    Join Date
    Mar 2002
    Location
    Cincinnati, Ohio, USA
    Posts
    6,824
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    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

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •