I want to search a colum on another workbook for a variable "VND" and if found return colum b from that locatin, and if nothing is found default to "MTS".
I get errors on set b.
I get errors on set b.
Code:
Workbooks.Open ("\\JAXentitive.xlsm") 'open book name with vendors
lr = Range("A1").End(xlDown).Row ' Last Row
With ("A1:A" & lr)
Set b = .Find(what = vnd, lookat:=xlWhole, LookIn:=xlValues)
If Not b Is Nothing Then
sname = Cells(b.Row, "B").Value
Else
sname = "Mts"
End If
End With