VBA_Newbie123
New Member
- Joined
- May 20, 2017
- Messages
- 9
Hi,
I have this code but just cannot find the value I am looking for as it will only return 'No match for' I have my dates in the correct column in exactly the same format
I have this code but just cannot find the value I am looking for as it will only return 'No match for' I have my dates in the correct column in exactly the same format
Code:
[/COLOR]Private Sub CommandButton4_Click()
Dim Found As Range
If TextBox3.Value = "" Then
MsgBox "No Date. ", , "Missing Entry"
Else
Set Found = Sheets("Sheet1").Range("C7:C30").Find(What:=TextBox3.Value, _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Found Is Nothing Then
MsgBox "No match for " & TextBox3.Value, , "No Match Found"
Else
Found.Offset(0, 1).Value = TextBox3.Value
End If
End If
End Sub
[COLOR=#333333]