+ Reply to Thread
Results 1 to 8 of 8

message box pop up within userform, clicking ok closes userform

  1. #1
    Registered User
    Join Date
    11-08-2011
    Location
    bergen county, NJ
    MS-Off Ver
    Excel 2007
    Posts
    72

    message box pop up within userform, clicking ok closes userform

    This place has been such a great resource for me in the past ! Thanks to all who help all of us beginners !!!

    I have a userform with several frames, each frame containing 10 option buttons. Users must select one option button from each frame. As i have it coded now, if the user chooses save, and there is a frame without an option button selected, an error message pops up... "please input score for frame X" So far so good, however, if the user clicks the "OK" button on the message box, the entire userform closes... What i need to happen is that the message box goes away and the user is back looking at the userform.

    I can't figure this out !

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,309

    Re: message box pop up within userform, clicking ok closes userform

    What code are you using currently?
    Anyone who confuses correlation and causation ends up dead.

  3. #3
    Valued Forum Contributor
    Join Date
    03-23-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    1,093

    Re: message box pop up within userform, clicking ok closes userform

    Hello there,

    Could you post your code to the on save button click event?

    Thanks!

  4. #4
    Registered User
    Join Date
    11-08-2011
    Location
    bergen county, NJ
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: message box pop up within userform, clicking ok closes userform

    HTML Code: 

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,309

    Re: message box pop up within userform, clicking ok closes userform

    You need to add
    Please Login or Register  to view this content.
    after each Msgbox line.

  6. #6
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127

    Re: message box pop up within userform, clicking ok closes userform

    I'm just going to chime in and ask if you'd like to post a copy of the workbook? Oftentimes (although not always) when code is extra repetitive, there is a better or more efficient method of coding. I'm sure we'd be glad to take a look if you posted.

  7. #7
    Registered User
    Join Date
    11-08-2011
    Location
    bergen county, NJ
    MS-Off Ver
    Excel 2007
    Posts
    72

    Re: message box pop up within userform, clicking ok closes userform

    romper stomper - thanks so much ! i figured it was something simple !
    big bas, in the future, i most likely will... as i newbie vba guy, i'm sure most of my coding could be reduced by better planning

    thanks guys !
    -rob

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: message box pop up within userform, clicking ok closes userform

    @ teacher_rob

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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