Consulting

Results 1 to 6 of 6

Thread: userform close when i close another excel file

  1. #1
    VBAX Newbie
    Joined
    Aug 2023
    Posts
    3
    Location

    userform close when i close another excel file

    hello
    I have UserForm, when I open another Excel file and then close it, UserForm closes automatically. Is there a code I add to UserForm that prevents it from being closed when I close another Excel file?
    thank you

  2. #2
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,064
    Location
    Welcome to VBAX azizis4. Can you post your code so we can see what you currently have?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  3. #3
    VBAX Newbie
    Joined
    Aug 2023
    Posts
    3
    Location
    I did not make a code for that, I want a code for that if possible, when I close another excel file, I do not want the userform to close with it

  4. #4
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,064
    Location
    Have a look at the concept of making the Userform modeless
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  5. #5
    VBAX Newbie
    Joined
    Aug 2023
    Posts
    3
    Location
    i tried to make a showmodal in the properties True and Fulse , but it did not work in the both way, I expect a bug in Excel 2016, unless there is code to solve this problem.







  6. #6
    Moderator VBAX Wizard Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    5,064
    Location
    Have a look here, and make sure you read through to the bottom of the page to understand. Hopefully this will give you some ideas to try. https://excelmacromastery.com/vba-userform/
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Posting Permissions

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