Hi all, <?xml:namespace prefix = o ns = "urn:schemas-microsoft-comfficeffice" /><o></o>
<o></o>
I have a userform with a listbox and some options buttons. <o></o>
<o></o>
the user will select an item from the listbox, select their option (Add, Remove, Edit, View). Their selection helps define the values and actions of userform2, which changes and populates info accordingly. <o></o>
<o></o>
Where I am running into trouble is I want to populate a custom warning message or error message if they forget to select either an item from the list or an option. How do I trigger a warning if nothing is selected from the listbox (BS1StyleList) ?<o></o>
<o></o>
<o></o>
<CODE><o></o>
Private Sub BS1Confirm_Click()
Application.ScreenUpdating = False
'Remove Warning
If BS1Remove = True Then Warn.Show vbModeless
'No Option selected Warning
If BS1Add = False And BS1Remove = False And BS1Edit = False And BS1View = False Then Warn.Show vbModeless<o></o>
'No Item Selected Warning
If BS1StyleList = Null Then Warn.Show vbModeless
<o></o>
'No Warning => goto Edit form
If BS1Add = True Or BS1Edit = True Or BS1View = True Then BSEdit.Show vbModeless
Application.ScreenUpdating = True
End Sub<o></o>
</CODE><o></o>
<o></o>
I've tried a few different ways and can't get one to work. Any help would be much appreciated. <o></o>
Thanks!<o></o>
BMRC<o></o>
<o></o>
I have a userform with a listbox and some options buttons. <o></o>
<o></o>
the user will select an item from the listbox, select their option (Add, Remove, Edit, View). Their selection helps define the values and actions of userform2, which changes and populates info accordingly. <o></o>
<o></o>
Where I am running into trouble is I want to populate a custom warning message or error message if they forget to select either an item from the list or an option. How do I trigger a warning if nothing is selected from the listbox (BS1StyleList) ?<o></o>
<o></o>
<o></o>
<CODE><o></o>
Private Sub BS1Confirm_Click()
Application.ScreenUpdating = False
'Remove Warning
If BS1Remove = True Then Warn.Show vbModeless
'No Option selected Warning
If BS1Add = False And BS1Remove = False And BS1Edit = False And BS1View = False Then Warn.Show vbModeless<o></o>
'No Item Selected Warning
If BS1StyleList = Null Then Warn.Show vbModeless
<o></o>
'No Warning => goto Edit form
If BS1Add = True Or BS1Edit = True Or BS1View = True Then BSEdit.Show vbModeless
Application.ScreenUpdating = True
End Sub<o></o>
</CODE><o></o>
<o></o>
I've tried a few different ways and can't get one to work. Any help would be much appreciated. <o></o>
Thanks!<o></o>
BMRC<o></o>