设为首页收藏本站Access中国

Office中国论坛/Access中国论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

Excel 内建的预设"路径"函数知多少

1970-1-1 08:00| 发布者: 佚名| 查看: 1501| 评论: 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                            '
传回目前的路径(开启旧文件时线市的路径)
    For a = 1 To 27
        Cells(a, 1) = Environ(a)
    Next

最新评论

相关分类

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

GMT+8, 2024-4-29 05:02 , Processed in 0.064018 second(s), 16 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回顶部