How to get file's current directory path to a string in VBA?

W

wenkej

In my VBA I needed to get some data from another Excel
file located in the same directory with current host excel
file.How could I got the current file's path ,something
the same as "../" in UNIX?
Thanks!
 
H

Harald Staff

Sub test()
Dim sPath As String
sPath = ActiveWorkbook.Path
MsgBox sPath
End Sub
 
Top