PC Review


Reply
Thread Tools Rate Thread

ACCESSING closed files

 
 
Berj
Guest
Posts: n/a
 
      5th Dec 2007
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 With Quote
 
 
 
 
john
Guest
Posts: n/a
 
      5th Dec 2007
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 With Quote
 
Gary''s Student
Guest
Posts: n/a
 
      5th Dec 2007
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Accessing All Sheets in a closed workbook jwallace Microsoft Excel Programming 4 20th May 2004 10:33 AM
Accessing Closed Workbook Information Loomah Microsoft Excel Programming 1 29th Jan 2004 01:45 PM
Accessing Closed Workbook Loomah Microsoft Excel Programming 2 28th Jan 2004 12:11 PM
Accessing Data from Closed Workbook Wolf Microsoft Excel Programming 0 5th Sep 2003 09:39 PM
Re: Accessing Data from Closed Workbook Andy Wiggins Microsoft Excel Programming 0 5th Sep 2003 06:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:15 PM.