Find Reference Workbook with Code

R

Ryan H

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
 
M

Mike H

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top