- Sep 3, 2020
- Office Version
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.
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