?
Solved

Referencing Excel Cells in Closed(UnOpened) Worksheets in VBA

Posted on 2003-03-20
1
Medium Priority
?
327 Views
Last Modified: 2012-06-22
Currently I am able to use VLOOKUP to reference tables on a network using the following formula for each cell:

=VLOOKUP(A1,'K:\Data\Siccodes\UK_Siccode\[uksic_code.xls]uksic_code'!$A$2:$B$657,2,0)

which I then paste to other cells (in VBA) by using

Range(B2:B1000).PasteSpecial xlPasteFormulas

This method is rather slow.

Is it possible (using VBA) to read data from this excel sheet and manually compare the values (rather than use VLOOKUP formula) without actually opening the sheet and get the required data.

Maybe something that would allow me to get data from an excel sheet without opening it.

Thanks
Av

0
Comment
Question by:csuld
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 50

Accepted Solution

by:
Dave Brett earned 375 total points
ID: 8173492
Hi csuld,

I think you will find the process is slow due to linking to an unopened file, not because you are using the Vlookup function.

If you don want to go down this path then the following link gives a procedure for extracring data from an unopened file.

http://j-walk.com/ss/excel/tips/tip82.htm

Cheers

Dave
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question