Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am having some problems using the VLookup command within my VBA code. I
have successfully written some code which will pull the Novell User ID and set it to strNovellUser. I want to now use the strNovellUser in a VLookup function to lookup some other information I have on another sheet (Users)in the workbook. I have verified that my Novell UserID shows up in column 1 and there is data in column 2, but the VLookup is either not finding it or it is not being set properly to strName. Below is part of the code I am using. Any help would be greatly appreciated. =============== Public Sub BasicInfo() Dim strName As String strName = WorksheetFunction.VLookup(strNovellUser, _ Worksheets("Users").Range("A2:E14"), 2) MsgBox "First Name is " & strName End Sub =============== |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup VBA code | Excel Discussion (Misc queries) | |||
VLOOKUP as a vb code | Excel Discussion (Misc queries) | |||
Using VLOOKUP in VBA code | Excel Worksheet Functions | |||
Vlookup in VB code | Excel Programming | |||
Help with Vlookup code | Excel Programming |