Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Checking for existence of value in another sheet | Excel Programming | |||
Vba - Checking existence of file | Excel Programming | |||
Checking for existence of excel | Excel Programming | |||
Checking for existence of excel | Excel Programming | |||
Checking for the Existence of a Folder | Excel Programming |