dss28
Board Regular
- Joined
- Sep 3, 2020
- Messages
- 165
- Office Version
- 2007
- Platform
- Windows
I am very new to VBA coding / excel as such. However I have designed a VBA based program for my needs based on several online VDOs and working satisfactorily. However the validation code for data entry is not working at all and data can be processed to next step without entering full information as required in the user form. i have included a part of the validation code. please help me in resolving the issue.
VBA Code:
Function ValidEntry() As Boolean
ValidEntry = True
With frmADLPOForm
'Default Color
.txbDescription.BackColor = vbWhite '8
If Trim(.txbDescription.Value) = "" Then
MsgBox "Please enter Description", vbOKOnly + vbInformation, "Description"
.txbDescription.BackColor = vbRed
.txbDescription.SetFocus
ValidEntry = False
Exit Function
End If
End With
End Function