Hi All,
Using this forum I discovered this fully working validation check, so first off, thank you.
I have another question to ask. I have quite a lot of text boxes that can not be empty. I could simply copy the same code to all of the text box's Lostfocus subroutine however this is very messy and i know there must be a method to reduce the coding. Perhaps by creating a subroutine or function that the text box's LostFocus could 'call'.
Any guidance as to how that could be done?
Thanks.
Dan
Using this forum I discovered this fully working validation check, so first off, thank you.
Code:
Private Sub TextBoxName_LostFocus()
If Len(TextBoxName.Value & vbNullString) = 0 Then
'do something
Endif
End Sub
I have another question to ask. I have quite a lot of text boxes that can not be empty. I could simply copy the same code to all of the text box's Lostfocus subroutine however this is very messy and i know there must be a method to reduce the coding. Perhaps by creating a subroutine or function that the text box's LostFocus could 'call'.
Any guidance as to how that could be done?
Thanks.
Dan