如何获取VBA中当前工作表的路径? [英] How to get the path of current worksheet in VBA?
本文介绍了如何获取VBA中当前工作表的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
使用 Application.ActiveWorkbook.Path
仅用于路径本身(没有工作簿名称)或 Application.ActiveWorkbook.FullName
用于路径与工作簿名字。
I wrote a macro as an add=in. And I need to get the path of the current worksheet on which it is being executed. How do I do this? How do I get the file path (just the directory)?
解决方案
Use Application.ActiveWorkbook.Path
for just the path itself (without the workbook name) or Application.ActiveWorkbook.FullName
for the path with the workbook name.
这篇关于如何获取VBA中当前工作表的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文