试了一下,是不支持APP.不过用API函数能够得到当前的目录.我做了一个小的得到当前目录的VBA函数试了一下可能得到.
Option Explicit Private Declare Function GetCurrentDirectoryA Lib "kernel32" (ByVal nBufferLength As Long, ByVal lpBuffer As String) As Long Sub GetAppPath() Dim strPath As String Dim PathLength As Long strPath = Space$(1024) PathLength = GetCurrentDirectoryA(Len(strPath), strPath) End Sub strPath中得到的就是当前目录,就是当前dvb文件所保存的目录. |