PDA

View Full Version : coding OptionButton to show message



buckchow
01-27-2007, 01:29 PM
I have 2 userforms feeding information into the same worksheet row, but in different columns. I have added an OptionButton on userform1 that if marked yes, then I would like a message box to show on userform2 saying "Serial number required". Normally the serial number textbox on Userform2 is left blank unless the user is notified that it is required. This message could appear either when the user tries saving the Userform2 data to the worksheet, when the user skips over the Userform2 serial number textbox, or when the user first enters data into Userform2. The common link between Userform1 and Userform2 is the batch number and which also determines if a serial number is required. Userform2 uses a dropdown combobox to choose the batch number that was originally entered on the worksheet by Userform1. The message box would just require an "Ok" button to close.

I know this is a little longwinded, but I wanted to provide as much detail as possible.

lucas
01-27-2007, 06:10 PM
Hey buckchow,
Maybe something along these lines?

buckchow
01-27-2007, 07:29 PM
Thanks for the quick reply. What I'm aiming to accomplish is to have a message appear on Userform2 requiring the user to enter a serial number in the serial number textbox if the "Serial number required" optionButton is checked on Userform1. Otherwise the Userform2 user does not enter a serial number when adding data.

lucas
01-27-2007, 08:22 PM
did you even open the attachment?

buckchow
01-27-2007, 09:38 PM
Yes, I did open and review the attachment but it had no relevance to my question. I would have attached a file for clarification but without the information the file wouldn't make much sense.

buckchow
01-27-2007, 09:38 PM
Yes, I did open and review the attachment but it had no relevance to my question. I would have attached a file for clarification but without the information the file wouldn't make much sense.:think:

lucas
01-27-2007, 09:56 PM
Yeah, I'm sorry buckchow but I don't understand....