Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading information from a closed workbook


Hi

I need to run a VBA program that reads information from a second excel
workbook.

Is it possible to extract this information while the second workbook is
closed?

Thanks


--
yhockman1
------------------------------------------------------------------------
yhockman1's Profile: http://www.excelforum.com/member.php...o&userid=32474
View this thread: http://www.excelforum.com/showthread...hreadid=522603

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Reading information from a closed workbook


you'll find the excel tips a wonderful source of information.


--
MattShoreson
------------------------------------------------------------------------
MattShoreson's Profile: http://www.excelforum.com/member.php...fo&userid=3472
View this thread: http://www.excelforum.com/showthread...hreadid=522603

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Reading information from a closed workbook

the best answer would depend a lot on the specifics. However, the fastest
way is to put a linking formula in a worksheet and retrieve the information

ActiveCell.Formula = "='C:\My Folder\[Myfile.xls]Sheet1'!A1"
' No replace the formula with the value returned
ActiveCell.Formula = ActiveCell.Value

you can do multiple cells this way with one command

with ActiveCell.Resize(50,10)
.Formula = "='C:\My Folder\[Myfile.xls]Sheet1'!A1"
.Formula = .Value
End with

If the data is organized like a Database, you can use ADO


http://www.erlandsendata.no/english/...php?t=envbadac

--
Regards,
Tom Ogilvy



"yhockman1" wrote:


Hi

I need to run a VBA program that reads information from a second excel
workbook.

Is it possible to extract this information while the second workbook is
closed?

Thanks


--
yhockman1
------------------------------------------------------------------------
yhockman1's Profile: http://www.excelforum.com/member.php...o&userid=32474
View this thread: http://www.excelforum.com/showthread...hreadid=522603


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
Reading values from a closed workbook Graham F New Users to Excel 6 July 28th 08 03:32 PM
Reading from a closed workbook WannaBeExceller Excel Programming 1 February 22nd 06 04:50 PM
Reading from a closed file. aking1987 Excel Worksheet Functions 1 November 15th 04 03:48 PM
Reading Sheet Names/Index from closed file using Biff8. keepITcool Excel Programming 16 November 5th 04 01:48 PM
Accessing Closed Workbook Information Loomah Excel Programming 1 January 29th 04 01:45 PM


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