The help says I can use some functions from excel in vba. So I’m trying vLookup as I want to grab a value from another sheet. This fails with a “run-time error ‘1004’ Unable to get the vlookup property of the worksheetfunction class.” I noticed in help that I might need to use the range object, thus the second example (which I added the appropriate code around it) that fails.
ActiveCell.FormulaR1C1 = Application.WorksheetFunction.VLookup(“A” & iRownum, Sheets(“Emp_No”), 2)
————————————————-
iRowCount = iRownum – 2 ‘Set the number of rows to work with before resetting the counter
iRownum = 2
Do While iRownum <= iRowCount
Range("Q" & iRownum).Select
ActiveCell.FormulaR1C1 = Application.WorksheetFunction.VLookup(Range("A" & iRownum), Sheets("Emp_No"), 2)
Loop
Any ideas?