Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Checking the existence of a reference workbook

I have a workbook ("C") which references other subroutines of another
workbook ("R"). When C is opened, R should have been automatically opened.
If somehow R cannot be opened, is it possible to write code to check the
existence of R? Seems that a IsWorkBookExists macro cannot do the job.
Thanks for your advice in advance.

Frederick Chow


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Checking the existence of a reference workbook

If C references R, opening R will cause C to be opened as well.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Frederick Chow" wrote in
message ...
I have a workbook ("C") which references other subroutines of
another workbook ("R"). When C is opened, R should have been
automatically opened. If somehow R cannot be opened, is it
possible to write code to check the existence of R? Seems that a
IsWorkBookExists macro cannot do the job. Thanks for your advice
in advance.

Frederick Chow



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Checking the existence of a reference workbook

Seems not possible, if workbooks C1, C2, C3.... Cn all reference workbook R,
then did you mean that if R is opened, then C1, C2, C3.... , Cn will be
opened simultaneously??

By the way, the issue is that in case the required R does not exist, I wish
that such error could be handled by my own code located in any C's, not by
the Excel compiler itself. Is it possible?

Frederick Chow

"Chip Pearson" wrote in message
...
If C references R, opening R will cause C to be opened as well.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Frederick Chow" wrote in message
...
I have a workbook ("C") which references other subroutines of another
workbook ("R"). When C is opened, R should have been automatically opened.
If somehow R cannot be opened, is it possible to write code to check the
existence of R? Seems that a IsWorkBookExists macro cannot do the job.
Thanks for your advice in advance.

Frederick Chow





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Checking the existence of a reference workbook

When a workbook references another workbook, the referenced
workbook will be automatically opened when the referencing
workbook is opened. The opposite is not true. If a referenced
workbook is opened, those workbooks that reference that workbook
will not be opened. Thus, using your example, opening any C
workbook will cause R to open, but opening R will not cause any C
workbook to open.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Frederick Chow" wrote in
message ...
Seems not possible, if workbooks C1, C2, C3.... Cn all
reference workbook R, then did you mean that if R is opened,
then C1, C2, C3.... , Cn will be opened simultaneously??

By the way, the issue is that in case the required R does not
exist, I wish that such error could be handled by my own code
located in any C's, not by the Excel compiler itself. Is it
possible?

Frederick Chow

"Chip Pearson" wrote in message
...
If C references R, opening R will cause C to be opened as
well.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Frederick Chow" wrote in
message ...
I have a workbook ("C") which references other subroutines of
another workbook ("R"). When C is opened, R should have been
automatically opened. If somehow R cannot be opened, is it
possible to write code to check the existence of R? Seems that
a IsWorkBookExists macro cannot do the job. Thanks for your
advice in advance.

Frederick Chow







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 75
Default Checking the existence of a reference workbook

OK, that's what I know of.

Anyway, what happened if R did not exist and C is opened? If errors occured,
is it possible to handle by VBA code located in C? This is my main question.

Frederick Chow


"Chip Pearson" wrote in message
...
When a workbook references another workbook, the referenced workbook will
be automatically opened when the referencing workbook is opened. The
opposite is not true. If a referenced workbook is opened, those workbooks
that reference that workbook will not be opened. Thus, using your example,
opening any C workbook will cause R to open, but opening R will not cause
any C workbook to open.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Frederick Chow" wrote in message
...
Seems not possible, if workbooks C1, C2, C3.... Cn all reference workbook
R, then did you mean that if R is opened, then C1, C2, C3.... , Cn will
be opened simultaneously??

By the way, the issue is that in case the required R does not exist, I
wish that such error could be handled by my own code located in any C's,
not by the Excel compiler itself. Is it possible?

Frederick Chow

"Chip Pearson" wrote in message
...
If C references R, opening R will cause C to be opened as well.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Frederick Chow" wrote in message
...
I have a workbook ("C") which references other subroutines of another
workbook ("R"). When C is opened, R should have been automatically
opened. If somehow R cannot be opened, is it possible to write code to
check the existence of R? Seems that a IsWorkBookExists macro cannot do
the job. Thanks for your advice in advance.

Frederick Chow









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
Checking for existence of value in another sheet [email protected] Excel Programming 2 October 20th 04 02:51 PM
Vba - Checking existence of file ajliaks[_26_] Excel Programming 1 August 11th 04 06:43 PM
Checking for existence of excel Dave Peterson[_3_] Excel Programming 3 June 26th 04 05:11 AM
Checking for existence of excel keepITcool Excel Programming 0 June 24th 04 06:07 PM
Checking for the Existence of a Folder Viswanath Tumu Excel Programming 2 April 19th 04 08:31 AM


All times are GMT +1. The time now is 10:51 PM.

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"