rockchalk33
Board Regular
- Joined
- Jan 12, 2016
- Messages
- 111
Hey all,
I have a Column A with multiple different names for trucks, for example "Shop"....What is wrong with my code below? I am visually seeing the truck labeled "Shop" in column A of Sheet11 but my message box continues to show that it does not exist...Can someone please help me.
I have a Column A with multiple different names for trucks, for example "Shop"....What is wrong with my code below? I am visually seeing the truck labeled "Shop" in column A of Sheet11 but my message box continues to show that it does not exist...Can someone please help me.
Code:
Sub test2()
Dim Truck_Name As Range
Dim Search_Range As Range
Set Search_Range = Sheet11.Range("A:A")
Set Truck_Name = Search_Range.Find(What:="Shop", MatchCase:=True, LookAt:=xlWhole, searchdirection:=xlPrevious)
If Truck_Name Is Nothing Then
MsgBox ("This truck does not exist and must be entered as a new truck first")
Exit Sub
End If
End Sub