+ Reply to Thread
Results 1 to 6 of 6

Switching Userform Error

  1. #1
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Switching Userform Error

    Hi All,

    I have one userform called "Initial" and one userform called "Data Entry". The "Initial" userform is the initial userform that the user sees upon opening the workbook. It contains two buttons (Data Entry and Reports). Clicking Data entry will show the "Data Entry" userform, this works as it should. This userform has no close button, only the X at the top right of the screen. therefore i have added this code to my userform:

    Please Login or Register  to view this content.
    This will work all and good to close the "Data Entry" userform and open the "Initial" userform. Basically creating a switch between the two userforms, i only want the user to go between the two userforms. My problem comes when i then click Data Entry on the "Initial" userform. It shows the "Data Entry" userform but on my other monitor and my userform does not populate my combo boxes or anything, also i am no longer able to close out of the "Data Entry" userform with the X. It is almost as though it is not initializing it or something. Any help on this is greatly appretiated. Thanks.

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Switching Userform Error

    you should not unload a form in its terminate event as it's already unloading. also you should not need to reshow the Initial form-it should do that. so the button on the initial form should have code like
    Please Login or Register  to view this content.
    and the data entry form doesn't need handling when it is closed
    Josie

    if at first you don't succeed try doing it the way your wife told you to

  3. #3
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Switching Userform Error

    JP,

    That works beautifully, thank you very much!

  4. #4
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Switching Userform Error

    you're welcome :-)

  5. #5
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Switching Userform Error

    well i tried to give you more rep, but sort of ironic i got this message "You must spread some Reputation around before giving it to JosephP again.". I guess it seems that you help me too much. Thanks again

  6. #6
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: Switching Userform Error

    no problem-the thought is more important!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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