Hi, i'm trying to add this line above the hyperlink line
[vba]
Mc = Application.WorksheetFunction.VLookup(Worksheets("Photo Details").Cells(i, 1).Value, Sheets("Employee Details").Range("StaffID"), 1, False)
[/vba]and have changed the hyperlink line to
[vba]
Mc.Offset(0, 11).Hyperlinks.Add Anchor:=Mc.Offset(0, 11), Address:=MyFile, TextToDisplay:="Yes"
[/vba]when i run it i am getting "Runtime Error 1004 unable to set the Vlookup property of the worksheet function class" what am i doing wrong?, i have Dim'd Mc as Variant, the statement falls within the "With" statement for the photo details sheets (previously sheet1 in the code above).
Regards,
SImon
EDIT: StaffID is a dynamic named range