HI:
The user selects a value from a list, the code will then lookup the value on another sheet which has an offset with the sheet name, and sets the variable to that sheet.
but then i get a 'Type Mismatch' Error highlighting
when i hover over the "Set Shaccount" it says "Nothing"
but the "Vouresult.offset(0,1)" does Give me Sheet5
Thanks
The user selects a value from a list, the code will then lookup the value on another sheet which has an offset with the sheet name, and sets the variable to that sheet.
Code:
Dim vOurResult As Range
With Sheet12.Range("SheetName")
Set vOurResult = .Find(what:=Sheet1.Range("E25"), After:=.Cells(1, 1), _
LookIn:=xlValues, LookAt:=xlWhole, SearchOrder:=xlByRows, _
SearchDirection:=xlNext, MatchCase:=False)
End With
If Len(Sheet1.Range("E25")) > 0 Then
Set shAccount = vOurResult.Offset(0, 1)
End If
but then i get a 'Type Mismatch' Error highlighting
Code:
[COLOR=red]Set shAccount = vOurResult.Offset(0, 1)[/color]
but the "Vouresult.offset(0,1)" does Give me Sheet5
Thanks