Dear All,
This is my first post here so wish me luck
I have a Excel Visual Basic User Form Search Box where I would like a MsgBox to appear when the user enters a search where there is no match found.
Thank You.
This is my first post here so wish me luck
I have a Excel Visual Basic User Form Search Box where I would like a MsgBox to appear when the user enters a search where there is no match found.
Thank You.
Code:
Private Sub EditCommandButton_Click()
Range("A:A").Select
If ProjectTextBox.Value = "" Then
MsgBox "Invalid Entry", vbCritical, "INVALID ENTRY"
Else
Selection.Find(What:=ProjectTextBox, After:=ActiveCell, LookIn:= _
xlFormulas, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:= _
xlNext).Activate
Me.Hide
ProjectTextBox.Value = ""
TechnicalTestLogEdit.Show
End If
End Sub