以下程序代码在开发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 '传回目前的路径(开启旧文件时线市的路径) For a = 1 To 27 Cells(a, 1) = Environ(a) Next |
|站长邮箱|小黑屋|手机版|Office中国/Access中国
( 粤ICP备10043721号-1 )
GMT+8, 2025-4-2 12:51 , Processed in 0.129446 second(s), 17 queries .
Powered by Discuz! X3.3
© 2001-2017 Comsenz Inc.