设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

如何获取 EXCEL 的一些环境路径

1970-1-1 08:00| 发布者: 未知| 查看: 2407| 评论: 0

 

如何获取Excel的环境参数:

 

 Debug.Print Application.AltStartupPath        '传回取代启动文件夹的名称

    Debug.Print ActiveWorkbook.Path               '传回目前工作簿的路径(档案未存盘时传回空字符串)

    Debug.Print ActiveWorkbook.FullName           '现用目前工作簿的路径及文件名称(档案未存盘时只传回暂存盘名)

    Debug.Print Application.NetworkTemplatesPath  '传回存储模板所在的网络路径,如果指定的网络路径不存在,本属性将传回一空字符串

    Debug.Print Application.TemplatesPath         '传回存储范本所在的区域路径

    Debug.Print Application.Path                  '传回Excel软件完整路径

    Debug.Print Application.DefaultFilePath       '传回或者设定 Microsoft Excel 开启档案时使用的预设路径

    Debug.Print Application.StartupPath           '传回启动文件夹的完整路径

    Debug.Print Application.LibraryPath           '传回软件库文件夹的路径

    Debug.Print Application.UserLibraryPath       '传回使用者计算机上 COM 加载宏安装位置的路径(2000以上)

    Debug.Print Application.PathSeparator         '传回路径分隔符

    Debug.Print CurDir  

最新评论

相关分类

QQ|站长邮箱|小黑屋|手机版|Office中国/Access中国 ( 粤ICP备10043721号-1 )  

GMT+8, 2024-4-29 11:04 , Processed in 0.080799 second(s), 16 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回顶部