LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default using VLookUp in a VBA program

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

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there a way to unload the loaded XLL file in Excel? Hi all, I amdebugging XLL link library using Visual C++. Everytime I rebuild the XLL, Ihave to close the whole Excel program and relaunch the Excel program again,and then load in the newly gene LunaMoon Excel Discussion (Misc queries) 0 July 28th 08 11:03 PM
My Program SM Charts and Charting in Excel 1 October 21st 05 09:48 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM
How to program a key, say F4? Jonathan Lee Excel Programming 2 October 14th 03 09:42 PM
run program Van daal Excel Programming 1 September 12th 03 04:50 PM


All times are GMT +1. The time now is 01:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"