Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I managed to do a vlookup from a closed file via: =VLOOKUP(A1,'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18,3,FALSE) but I do not manage to do it by code - I think the problem is that I do not know the sytax to put 'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18 in VBA. Can you help, many thanks, Dan |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() FormualStr = "=VLOOKUP(A1,'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18,3,FALSE)" Range("B1).formula = FormulaStr "Dan" wrote: Hi, I managed to do a vlookup from a closed file via: =VLOOKUP(A1,'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18,3,FALSE) but I do not manage to do it by code - I think the problem is that I do not know the sytax to put 'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18 in VBA. Can you help, many thanks, Dan |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks, but that is not what I am after- you are just assigning a formula
via code - nothing to do with vlookup. I want to use Application.VLookup... Thanks "Joel" wrote: FormualStr = "=VLOOKUP(A1,'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18,3,FALSE)" Range("B1).formula = FormulaStr "Dan" wrote: Hi, I managed to do a vlookup from a closed file via: =VLOOKUP(A1,'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18,3,FALSE) but I do not manage to do it by code - I think the problem is that I do not know the sytax to put 'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18 in VBA. Can you help, many thanks, Dan |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
You can't do a Vlookup in VBA on a closed workbook so you have options. 1. fleeting open the workbook do the lookup and capture the value or 2. Write a formula to the worksheet capture the value and delete the formula Mike "Dan" wrote: Hi, I managed to do a vlookup from a closed file via: =VLOOKUP(A1,'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18,3,FALSE) but I do not manage to do it by code - I think the problem is that I do not know the sytax to put 'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18 in VBA. Can you help, many thanks, Dan |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you
"Mike H" wrote: Hi, You can't do a Vlookup in VBA on a closed workbook so you have options. 1. fleeting open the workbook do the lookup and capture the value or 2. Write a formula to the worksheet capture the value and delete the formula Mike "Dan" wrote: Hi, I managed to do a vlookup from a closed file via: =VLOOKUP(A1,'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18,3,FALSE) but I do not manage to do it by code - I think the problem is that I do not know the sytax to put 'C:\temp\[test3.xls]Sheet1'!$A$1:$C$18 in VBA. Can you help, many thanks, Dan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
vlookup on close file | Excel Worksheet Functions | |||
VLOOKUP Closest Match Not Close Enough | Excel Programming | |||
Before close - not always deleting sheet- WHY?? | Excel Programming | |||
Close Hidden Data Sheet | Excel Programming | |||
Hanging on sheet close | Excel Programming |