使用 App.Path 可以得到应用所在的目录。不过得注意,当在根目录下时,Path 的返回值最右字符为 “\” ,如“c:\”,而如果不在根目录,则最右字符非 “\”,如“c:\vb5”。所以在使用 Path 做连接时,应使用以下的代码: Dim FileName As String Dim fullpath As String If Right(App.path, 1) = "\" Then fullpath = App.path + FileName Else fullpath = App.path + "\" + FileName End If '或者: pth$ = App.path & IIf(Len(App.path) > 3, "\", "")