allelopath
asked on
relative path to file
I'm trying to access a file, but can't do it with a relative path.
If I use an absolute path, e.g.
excelFileSource = "C:\\My Documents\\myDirectory\\my File.xls"
then it works, but I need to do it with a relative path.
How can I accomplish this?
If I use an absolute path, e.g.
excelFileSource = "C:\\My Documents\\myDirectory\\my
then it works, but I need to do it with a relative path.
How can I accomplish this?
Dim excelFileSource As String
excelFileSource = "myDirectory\\myFile.xls"
Set excelApplication = GetObject(, "Excel.Application")
If Err = 429 Then
Set excelApplication = CreateObject("Excel.Application")
End If
Set excelWorkbookSource = excelApplication.Workbooks.Open(excelFileSource)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER