View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JW[_2_] JW[_2_] is offline
external usenet poster
 
Posts: 638
Default How to leave form displayed

In your If statement that cycles through the controls to see if more
than one is selected, add an Exit Sub line.
If "criteria met to display message"
Msgbox "More than one item selected. Please correct."
Exit Sub
End If
JT wrote:
On my spreadsheet, the user will push a button to display a form with the
lunch menu. The lunch menu is a multi tab control with 8 tabs (with mulitple
selections on weach tab).

The form allows the user to make a selection on each tab but they can only
make one selection for lunch.

I have an edit that cylces through the tabs and see if there is a selection.
If there are multiple selections (on different tabs), I display a message to
alert the user to review the form and change it so there is only 1 selection.

How do I code it so that after the user clicks "ok" on the message, the
message goes away, and the form is still displayed until the user clicks
"Order" again?

Right now when the user clicks "ok", the message goes away and the code
continues to process (which hides the form.)

Thanks for the help.....
--
JT