ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Find Reference Workbook with Code (https://www.excelbanter.com/excel-programming/436936-find-reference-workbook-code.html)

Ryan H

Find Reference Workbook with Code
 
I have a Add-In workbook that has code to manipulate data in another workbook
called Quote Generator. Is there a way I can write code to find the
referenced workbooks properties such as .Path and .Name?

For example,

' in Quote Generator workbook
Private Sub Workbook_Open()

' show reference workbooks path
MsgBox ReferencedWorkbook.Path
MsgBox ReferencedWorkbook.Name

End Sub
--
Cheers,
Ryan

Mike H

Find Reference Workbook with Code
 
Ryan,

It's not clear how your referencing the workbook but .Fullname returns the
name and path

r = ThisWorkbook.FullName

or

MsgBox ReferencedWorkbook.FullName

Mike

"Ryan H" wrote:

I have a Add-In workbook that has code to manipulate data in another workbook
called Quote Generator. Is there a way I can write code to find the
referenced workbooks properties such as .Path and .Name?

For example,

' in Quote Generator workbook
Private Sub Workbook_Open()

' show reference workbooks path
MsgBox ReferencedWorkbook.Path
MsgBox ReferencedWorkbook.Name

End Sub
--
Cheers,
Ryan



All times are GMT +1. The time now is 11:25 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com