+ Reply to Thread
Results 1 to 3 of 3

Close one userform and open next one

  1. #1
    Registered User
    Join Date
    01-25-2011
    Location
    Milan, Italy
    MS-Off Ver
    Excel 2007
    Posts
    62

    Close one userform and open next one

    hello there, I want to close a userform and open the next one with the click of a button. All works fine but.... I have 3 userforms and the routine runs 2 times before it actually works:

    first button on userform1 (Insert_Data):

    Insert_Data.Hide
    INOUT.Show

    Insert data hides and inout shows ok

    userform2 (INOUT)

    Unload Me
    REPORT.Show

    works fine
    Userform3 (REPORT)

    Unload Me

    at this point Insert_Data opens again. How can I prevent it from happening?

    thanks for all the help you can give me

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Close one userform and open next one

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED, scroll down and click Manage Attachments.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    01-25-2011
    Location
    Milan, Italy
    MS-Off Ver
    Excel 2007
    Posts
    62

    Re: Close one userform and open next one

    Hello Norie,

    thanks for your reply. I was going to upload a sample. So I took the actual workbook and started deleting some sensitive data and guess what? the problem never occurred again. So I guess problem solved.

    Again, thank you for your reply.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Must open and close UserForm twice for the other codes in the "Open..." Macro to execute
    By tnuis in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-10-2013, 09:28 AM
  2. Userform won't open with worksheet. Causing error and force close.
    By drew.j.harrison in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-30-2013, 10:51 AM
  3. [SOLVED] How to open msgBox and close UserForm if no data found
    By tuongtu3 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-12-2012, 04:45 AM
  4. [SOLVED] Wanna make a Userform Close and Save - Then open a different workbook?
    By Wanting2Excel in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 12-06-2012, 08:29 PM
  5. How to Open 2nd workbook from userform, then close 2nd Userform
    By bigfoot007 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2012, 02:03 PM
  6. Application Open/Close Event - Store Open and Close Times?
    By mccrimmon in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 07-13-2011, 04:21 PM
  7. close workbook and open userform
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-16-2009, 06:46 AM
  8. Open Userform when you close a spreadsheet
    By nickbarthram in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-27-2007, 10:01 AM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1