Hi
Im looking for a bit of code so that if textbox.1 from a userform is left blank when unloading the form, a msg appears with a warning, and doesn’t allow you to save unless all boxes are completed.
I have the following at the moment:
a = TextBox1.Text
If a = "" Then
MsgBox "You must enter your name"
End If
Range("D5").Select
Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Value = a
Kind Regards,
Dan.
Im looking for a bit of code so that if textbox.1 from a userform is left blank when unloading the form, a msg appears with a warning, and doesn’t allow you to save unless all boxes are completed.
I have the following at the moment:
a = TextBox1.Text
If a = "" Then
MsgBox "You must enter your name"
End If
Range("D5").Select
Do Until ActiveCell.Value = ""
ActiveCell.Offset(1, 0).Select
Loop
ActiveCell.Value = a
Kind Regards,
Dan.