chipsworld
Board Regular
- Joined
- May 23, 2019
- Messages
- 161
- Office Version
- 365
Found this little tid bit somewhere on the web and it works great, but was wondering if someone could tell me how to modify it so that I could not include certain textboxes (controls)
VBA Code:
Dim t As Control
For Each t In Me.Controls
If TypeName(t) = "TextBox" Then ' Make sure we're only looking at textboxes.
If t.Text = vbNullString And t.Tag <> vbNullString Then
MsgBox "All fields must be completed before proceeding!" & vbCrLf & vbCrLf & _
t.Tag, vbinfirmation, "Information: Incomplete Entry!"
t.SetFocus
End If
End If
Next
Exit Sub
End If