3

When I open Microsoft Visual Basic for Applications 7, I see the project window. I.e. file1.xla, file2.xlam, etc. If I have multiple files names file1.xla, how do I know which one I'm looking at? I can't find the path to the file in the IDE.

I have some Excel plugins installed, which might be why some files continuously show up in the list.

4

2 回答 2

3

在即时窗口中,您可以键入:

?Workbooks("File1.xla").path

例如。

于 2015-05-07T13:23:59.537 回答
2

您可以使用以下方法获取当前活动的路径VBProject
Application.VBE.ActiveVBProject.FileName

您还可以通过遍历Application.VBE.VBProjects集合来获取所有路径。

于 2015-05-07T13:05:02.530 回答