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

Using a macro, how can I write the value from
Workbooks("Wb1").Range("Rng1") to Workbooks("Wb2").Range("Rng2") when
"Wb2" is closed?

Conversely, how can I read the value from
Workbooks("Wb2").Range("Rng2") into Workbooks("Wb1").Range("Rng1") when
"Wb2" is still closed?

I don't want to use links because I need complete control over the
event and I need to pass data in both directions.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Read/Write from/to a closed workbook

Look at the thread in this NG from 11 June:
Problem with file finding macro.

RBS

"Alan" wrote in message
oups.com...
Using a macro, how can I write the value from
Workbooks("Wb1").Range("Rng1") to Workbooks("Wb2").Range("Rng2") when
"Wb2" is closed?

Conversely, how can I read the value from
Workbooks("Wb2").Range("Rng2") into Workbooks("Wb1").Range("Rng1") when
"Wb2" is still closed?

I don't want to use links because I need complete control over the
event and I need to pass data in both directions.


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

that really isn't supported unless your range is organized like a database

If it is, you can treat the file as a database and use ADO


http://www.erlandsendata.no/english/...php?t=envbadac
--
Regards,
Tom Ogilvy



"Alan" wrote:

Using a macro, how can I write the value from
Workbooks("Wb1").Range("Rng1") to Workbooks("Wb2").Range("Rng2") when
"Wb2" is closed?

Conversely, how can I read the value from
Workbooks("Wb2").Range("Rng2") into Workbooks("Wb1").Range("Rng1") when
"Wb2" is still closed?

I don't want to use links because I need complete control over the
event and I need to pass data in both directions.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Read/Write from/to a closed workbook

Tom, if the range is a single cell can I do it then? And if so, how??

Thanks,

Tom Ogilvy wrote:
that really isn't supported unless your range is organized like a database

If it is, you can treat the file as a database and use ADO


http://www.erlandsendata.no/english/...php?t=envbadac
--
Regards,
Tom Ogilvy


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
opening workbook as read-only or write-enabled archiboy Excel Programming 1 January 31st 06 01:11 PM
How to read from a closed workbook? matelot Excel Programming 6 December 5th 05 06:39 AM
Read And Write On A Closed Wbook sal21[_47_] Excel Programming 2 November 11th 04 11:10 PM
Write no closed workbook ? MAS Excel Programming 2 July 31st 04 04:39 PM
Write to closed workbook code Todd Huttenstine[_3_] Excel Programming 4 May 4th 04 09:59 AM


All times are GMT +1. The time now is 12:00 AM.

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"