Results 1 to 4 of 4

Thread: Keep userform open when opening or closing other workbooks

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Sage SamT's Avatar
    Joined
    Oct 2006
    Location
    Near Columbia
    Posts
    7,709
    Location
    on opening the workbook, code runs that hides the workbook and only shows the userform... - are you referring to it being placed in the userform sub somewhere ??
    Whatever code module that/those procedure(s) are in now is fine, but, you have to be able to run it/them from an Application Event procedure. That means it/they need to be in their own sub(s), or be duplicated in the Application Event Sub.

    Always place "Option Explicit" at the top of all your code pages. You should use the VBA Menu >> Tools >> Options >> Editor Tab and check all the boxes in the top Frame. This will auto place "Option Explicit" in new code pages and enable other code checking tools in VBA.

    To get help on any VBA term, place the cursor in or next to the word and press F1. Pressing F2 will bring up an interesting page that gives you a lot of information about VBA terms.

    I am 69+yo and still use Excel XP, depending on your system you may have to modify the code to work on your system.

    You might even have to go to Microsoft.com for help. DuckDuckgo is your friend. Search the internet for "Excel VBA " + the VBA term. "Excel VBA Application Event"

    Good tutorial here. Detailed tutorial here. MS Excel online help here.
    Last edited by SamT; 10-15-2019 at 05:01 AM.
    Please take the time to read the Forum FAQ

Posting Permissions

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