Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
VLOOKUP in VBA
Hi all, first posted question. I think, using VBA to populate a cell with a VLOOKUP string to an external Workbook, requires the external Workbook to be open at the time the code is executed. My code is this: Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean) If ActiveCell.Column < 16 Then End UserForm1.Show If LUG_LOOKUP_INDEX = 10 Then End r = ActiveCell.Row c = ActiveCell.Column TheString = "=VLOOKUP(" & LUG_LOOKUP_INDEX & ", HeaderLugMaterial, 4,TRUE)" Worksheets("Inputs").Cells(r, c) = TheString End End Sub Each time the cell is populated with the VLOOKUP string the external Workbook opens and the table_array is highlighted. Not very eloquent. Looking for validation on my assumption. Regards, Bob *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VLookUp - Does the VLookUp return the exact information? | Excel Worksheet Functions | |||
Vlookup in vlookup - taking the result as array name | Excel Worksheet Functions | |||
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP | Excel Discussion (Misc queries) | |||
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) | New Users to Excel | |||
Vlookup info being used without vlookup table attached? | Excel Worksheet Functions |