VBA - Worksheet Functions...
Posted by Greg Taylor on April 23, 2001 12:35 PM
Set MyObject = GetObject("C:\My Documents\HrDatabase.xls")
MyObject.Application.Visible = True
myRange = "A1:D9999"
Index = MyObject.Application.WorksheetFunction.VLookup(Name, myRange, 2)
Form_MM.Lb_EmpIndex.Caption = Index
This is what I have. But I keep getting
"Unable to get the VLookup property of the worksheetfunction class."
What am I doing wrong? Thanks