ajay_gajree
Well-known Member
- Joined
- Jul 16, 2011
- Messages
- 518
Hi all, How do I convert the below into VBA code?
I have tried the below and it isn't working?
Any help appreciated!
HTML:
=IF(AB2=IFERROR(VLOOKUP(AB2,tblBRPDatabase[Primay Key],1,FALSE),"No Existing Record in the Database"),"Record Already Exists","No Existing Record in the Database")
I have tried the below and it isn't working?
Code:
On Error Resume Next
x = Application.VLookup(TextBox1.Value, Worksheets("BRP Database").ListObjects("tblBRPDatabase"), 2, False)
If x = "" Then
Me.TextBox2.Value = "No Existing Record in the Database"
Else
Me.TextBox2.Value = "Record Already Exists"
End If
Any help appreciated!