設為首頁收藏本站Access中國

Office中國論壇/Access中國論壇

 找回密碼
 注冊

QQ登錄

只需一步,快速開始

Excel 內(nèi)建的預設"路徑"函數(shù)知多少

1970-1-1 08:00| 發(fā)布者: 佚名| 查看: 1575| 評論: 0

以下程序代碼在開發(fā)Excel軟件時可供參可及利用的

    Debug.Print Application.AltStartupPath        '
傳回取代啟動數(shù)據(jù)夾的名稱
    Debug.Print ActiveWorkbook.Path               '
傳回目前工作簿的路徑(檔案未存盤時傳回空字符串)
    Debug.Print ActiveWorkbook.FullName           '
現(xiàn)用目前工作簿的路徑及文件名稱(檔案未存盤時只傳回暫存盤名)
    Debug.Print Application.NetworkTemplatesPath  '
傳回儲存模板所在的網(wǎng)絡路徑,如果指定的網(wǎng)絡路徑不存在,本屬性將傳回一空字符串
    Debug.Print Application.TemplatesPath         '
傳回儲存模板所在的區(qū)域路徑
    Debug.Print Application.Path                  '
傳回Excel程序完整路徑
    Debug.Print Application.DefaultFilePath       '
傳回或者設定 Microsoft Excel 開啟檔案時使用的預設路徑
    Debug.Print Application.StartupPath           '
傳回啟動數(shù)據(jù)夾的完整路徑
    Debug.Print Application.LibraryPath           '
傳回鏈接庫數(shù)據(jù)夾的路徑
    Debug.Print Application.UserLibraryPath       '
傳回使用者計算機上 COM 加載宏安裝位置的路徑(2000以上)
    Debug.Print Application.PathSeparator         '
傳回路徑分隔符
    Debug.Print CurDir                            '
傳回目前的路徑(開啟舊文件時線市的路徑)
    For a = 1 To 27
        Cells(a, 1) = Environ(a)
    Next

最新評論

相關(guān)分類

QQ|站長郵箱|小黑屋|手機版|Office中國/Access中國 ( 粵ICP備10043721號-1 )  

GMT+8, 2025-7-13 08:46 , Processed in 0.084707 second(s), 16 queries .

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc.

返回頂部