Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VLOOKUP into a closed xls using VBA


Hi there,

This thread was posted by Larry Mehl in Excel Charting forum by mistak
so he
didn't get any replies. As i'm after the same thing exactly , i thouhg
to repost the
same question.

Cheers
AnA

"Hello --

Can someone show me the format for using VLOOKUP in VBA to get a valu
from
a closed xls file?

In a worksheet
=VLOOKUP(1,TA_TestScript.xls!TestCases,2,FALSE)

TA_TestScript.xls is the closed file

works, but I can't figure out the correct combination of [ ], " ", etc
to
make it work in VBA.

Thanks for any help.

Larry Mehl

--
alk100
-----------------------------------------------------------------------
alk1000's Profile: http://www.excelforum.com/member.php...fo&userid=1497
View this thread: http://www.excelforum.com/showthread.php?threadid=26596

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default VLOOKUP into a closed xls using VBA

VBA doesn't support going to closed workbooks.

Workarounds include opening the workbook, using an xl4 macro command, using
a database query with ADO or DAO. The fastest is putting your formula in a
cell, then collecting the returned value and clearing the cell.

--
Regards,
Tom Ogilvy



"alk1000" wrote in message
...

Hi there,

This thread was posted by Larry Mehl in Excel Charting forum by mistake
so he
didn't get any replies. As i'm after the same thing exactly , i thouhgt
to repost the
same question.

Cheers
AnA

"Hello --

Can someone show me the format for using VLOOKUP in VBA to get a value
from
a closed xls file?

In a worksheet
=VLOOKUP(1,TA_TestScript.xls!TestCases,2,FALSE)

TA_TestScript.xls is the closed file

works, but I can't figure out the correct combination of [ ], " ", etc.
to
make it work in VBA.

Thanks for any help.

Larry Mehl"


--
alk1000
------------------------------------------------------------------------
alk1000's Profile:

http://www.excelforum.com/member.php...o&userid=14970
View this thread: http://www.excelforum.com/showthread...hreadid=265960



Reply
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
how do i link data from closed worksheets without vlookup. Rainmaker Excel Worksheet Functions 1 January 21st 09 03:25 PM
Vlookup From Closed Worksheet Jeremy Excel Discussion (Misc queries) 5 April 8th 08 06:45 PM
VLOOKUP from closed file using INDIRECT function Ben Excel Worksheet Functions 3 May 17th 06 01:58 AM
strange prob: file not getting closed after vlookup No Name Excel Programming 4 September 30th 04 09:07 AM
vlookup from VBA on a closed workbook Dennis_I Excel Programming 1 August 17th 04 06:58 PM


All times are GMT +1. The time now is 01:14 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"