Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
The following code will show a message box if any text boxes on a user form
are empty: Private Sub CommandButton1_Click() Dim TB As Control For Each TB In UserForm1.Controls If TB.Name Like "TextBox*" Then If TB.Value = "" Then MsgBox ("Please fill all boxes") End If End If Next I would like the code to then stop once the "ok" button on the message box is hit. Currently, it continues once the button is clicked. I've lost some hair over this one..... -- tia Jock |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OnTime code error "can't execute code in break mode" | Excel Programming | |||
Halt all code while macro runs | Excel Programming | |||
Code Halt - prevents reset of the AutomationSecurity level | Excel Programming | |||
Code to halt a macro | Excel Programming |