Cannot open Filepath on MacBook

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
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.

Forum statistics

Threads
1,223,214
Messages
6,170,771
Members
452,353
Latest member
strainu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top