Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default ACCESSING closed files

Hi All,

Is there a command which I can add at the beginning of a macro so
that it can access the data in other Excel files without opening them?

Thanks.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default ACCESSING closed files

See Ron de Bruin's site:
http://www.rondebruin.nl/ado.htm
--
JB


"Berj" wrote:

Hi All,

Is there a command which I can add at the beginning of a macro so
that it can access the data in other Excel files without opening them?

Thanks.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default ACCESSING closed files

You can have VBA do the same thing a user can do on the worksheet. Say we
want to get the value in cell A1 in sheet b in file b.xls in folder c:\temp2

Pick a helper cell (say Z100) and:

Sub dumpit()
Dim s As String
s = "='C:\temp2\[b.xls]b'!$A$1"
Range("Z100").Formula = s
End Sub
--
Gary''s Student - gsnu200760


"john" wrote:

See Ron de Bruin's site:
http://www.rondebruin.nl/ado.htm
--
JB


"Berj" wrote:

Hi All,

Is there a command which I can add at the beginning of a macro so
that it can access the data in other Excel files without opening them?

Thanks.

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
Accessing All Sheets in a closed workbook jwallace Excel Programming 4 May 20th 04 10:33 AM
Accessing Closed Workbook Information Loomah Excel Programming 1 January 29th 04 01:45 PM
Accessing Closed Workbook Loomah Excel Programming 2 January 28th 04 12:11 PM
Accessing Data from Closed Workbook Wolf[_2_] Excel Programming 0 September 5th 03 09:39 PM
Accessing Data from Closed Workbook Andy Wiggins[_2_] Excel Programming 0 September 5th 03 06:42 PM


All times are GMT +1. The time now is 03:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"