Consulting

Results 1 to 3 of 3

Thread: Window Activate Anomoly

  1. #1
    VBAX Regular
    Joined
    Jan 2009
    Posts
    57
    Location

    Window Activate Anomoly

    Title should read: Workbook Activate Anomoly

    I have WB1 that uses modeless Userform1 to open WB2 & hides itself.

    WB2 has a modal Userform2. I have been trying to get Workbook_Activate event in WB1 to execute when WB2 closes so that I can reload Userform1.

    If I use the X at the top right of the WB to close it, the Workbook_Activate in WB1 does activate. However, if I use Thisworkbook.Close in WB2 code it fails to run the Workbook_Activate event in WB1.

    I have also tried closing WB2 from WB1 but cannot get Userform1 to reload as the focus goes to WB2.

    Any suggestions most welcome.
    Last edited by pcsparky; 12-08-2009 at 12:01 PM.

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Clue for you. 9 people before me looked at this and didn't respond.

    If you provide the workbook so we don't have to reproduce it and guess at the code you are using maybe you will have better luck.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    VBAX Regular
    Joined
    Jan 2009
    Posts
    57
    Location
    I think it's just one of those Excel moments. I've decided to remove the form from the other workbook and place it in WB1, that way focus stays with it.

Posting Permissions

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