How to find the path to an XLA file in Microsoft Visual Basic for Applications 7

When I open Microsoft Visual Basic for Applications 7, I see the project window. That is, file1.xla, file2.xlam, etc. If I have multiple filenames file1.xla, how do I know who I'm looking at? I cannot find the file path in the IDE.

I have some Excel plugins that might be causing some files to show up all the time in the list.

+3


source to share


2 answers


In the Immediate window, you can enter:

?Workbooks("File1.xla").path

      



eg.

+1


source


You can get the path to the currently active VBProject

one using:
Application.VBE.ActiveVBProject.FileName



You can also get all paths by going through the collection Application.VBE.VBProjects

.

+2


source







All Articles