+ Reply to Thread
Results 1 to 3 of 3

Adding MsgBox to Userform

  1. #1
    Registered User
    Join Date
    09-25-2006
    Posts
    12

    Adding MsgBox to Userform

    I have 2 userforms feeding data to the same rows in a worksheet. Userform1 user inserts the batch number in the combobox and other data into the worksheet and clicks the OptionButton to notify Userform2 that he is required to enter the serial number. If Userform2 clicks on the matching batch number in the dropdown combobox, and Userform1 has clicked on the OptionButton indicating a serial number is required, then I would like a message box to pop up on Userform2 to notify the user that he needs to enter a serial number in the serial number textbox. The message box would only need to have an 'Ok' button to close. I have added an attachment for clarification.
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello BuckChow,

    After you have tested your conditions for the MessageBox to display your message, this all you need to do...

    MsgBox "Your message goes in the quotes"

    That's it. The default button is "OK". Your macro will stop running until the user responds to the Message Box.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    09-25-2006
    Posts
    12
    My problem is that I don't know how to test the conditions with code. Also, in my previous attachment I accidently left out the step where Userform2 uses the dropdown combobox to select the batch number from the worksheet.
    Attached Files Attached Files
    Last edited by buckchow; 01-31-2007 at 01:25 AM.

+ 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