JuliaLydall
New Member
- Joined
- Mar 28, 2016
- Messages
- 1
I found the Mac filepath with the "Go To Folder" application and confirmed it through "Terminal"
/Users/ant/Dropbox/1100-Timesheet/1100-03-160216-Database.xlsm
I have tried adding .xlsm or not.
I have tried using : and / as separators
I tried adding Macintosh HD to the beginning of the file path.
Nothing seems to work, I get the same error message of Impossible to find file please check you have spelled it correctly or it is in the folder.
What am I Doing wrong?
Sub OpenDatabase()
'Open Database
Dim BasePath As String, UserName As String, MyPath As String, MyFile As String
Dim wb As Workbook
Dim GetUserNameMac As String
Dim sMyScript As String
sMyScript = "set userName to short user name of (system info)" & vbNewLine & "return userName"
GetUserNameMac = MacScript(sMyScript)
BasePath = ":Users:" & GetUserNameMac
MyPath = BasePath & ":Dropbox:1100-Timesheet:"
MyFile = MyPath & "1100-03-160216-Database"
Set wb = Workbooks.Open(MyFile)
End sub
/Users/ant/Dropbox/1100-Timesheet/1100-03-160216-Database.xlsm
I have tried adding .xlsm or not.
I have tried using : and / as separators
I tried adding Macintosh HD to the beginning of the file path.
Nothing seems to work, I get the same error message of Impossible to find file please check you have spelled it correctly or it is in the folder.
What am I Doing wrong?
Sub OpenDatabase()
'Open Database
Dim BasePath As String, UserName As String, MyPath As String, MyFile As String
Dim wb As Workbook
Dim GetUserNameMac As String
Dim sMyScript As String
sMyScript = "set userName to short user name of (system info)" & vbNewLine & "return userName"
GetUserNameMac = MacScript(sMyScript)
BasePath = ":Users:" & GetUserNameMac
MyPath = BasePath & ":Dropbox:1100-Timesheet:"
MyFile = MyPath & "1100-03-160216-Database"
Set wb = Workbooks.Open(MyFile)
End sub