Thank you in advance.
I have an ActiveX userform that has a single frame with 4 multiselect listboxes, 4 textboxes, update command button to send info to worksheet, command buttons to close or refresh the form. If the user does NOT make any selections from the 4 multiselect listboxes OR does NOT enter anything in one of the 4 textboxes, they should receive a message alert when they click the update command button that is coded to send entries to the target Excel worksheet. That's a problem if they send blank entries and it overrides any current entries that exist in the worksheet.
So the flow of the code should be something like this when they click the command button (maybe the last steps are reversed?):
- Validation: check to see if there are ANY selections in ANY multiselect listbox OR entries in ANY textbox within the frame (or userform)
- If result is FALSE, pop a message box stating something like "No entries made, return to the form and make entries or use the X button to close form with no changes" and have the code stop there
- If condition is TRUE, then continue with the code I have to send the selections to the target cells in the worksheet.
I've searched all day and posted this thread earlier this morning with a different approach that is not as clean by disabling the update command button (didn't get a completely working solution there either). It feels as though my stumbling block is having multiple multiselect listboxes. I've seen many posts for checking for selections for 1, but not more than that.
Any suggestions as always are much appreciated!