Hi all,
I am trying to use VLookUp in VBA. My code is as follows
Dim WorkSheet As String
Dim LookUpValue As String
Dim TableArray As String
Dim ColumnIndexNumber As String
WorkSheet = "'Links (S)'"
LookUpValue = CStr(ShiftNumber)
TableArray = WorkSheet & "!" & "$E$1:$G$70"
ColumnIndexNumber = "1"
ShiftType = Application.WorksheetFunction.VLookup(LookUpValue
TableArray, ColumnIndexNumber)
When I run it, it says that it can't find VLookUp as a
WorksheetFunction. I am not sure how I can make it work.
I have also tried Excel.WorksheetFunction.VLookup without success.
Another sub-question is, when i use EXCEL WORKSHEET FUNCTIONS, I assum
that all arguements to the FUNCTIONS are supplied as STRINGS. Is this
correct assumption?
Jame
--
Message posted from
http://www.ExcelForum.com