So I've tried looking around the net and forums for solving this but since I can't seem to understand this at all, I need a bit of advice.
I have a Macro that I used to run on Excel 2011 on Mac that I do not have anymore. When I try to run this on Excel 2016 on Mac, I am getting a Run-time Error '1004', Sorry we couldn't find (file location). Is it possible that it was moved, renamed etc error.
The Code is per below
On Error Resume Next
MyPath = MacScript("return (path to documents folder) as String")
MyScript = _
"set applescript's text item delimiters to "","" " & vbNewLine & _
"set theFiles to (choose file of type " & _
" {""com.microsoft.Excel.xls""} " & _
"with prompt ""Please select a file or files"" default location alias """ & _
MyPath & """ multiple selections allowed true) as string" & vbNewLine & _
"set applescript's text item delimiters to """" " & vbNewLine & _
"return theFiles"
MyFiles = MacScript(MyScript)
On Error GoTo 0
If MyFiles <> "" Then
With Application
.ScreenUpdating = False
.EnableEvents = False
End With
MySplit = Split(MyFiles, ",")
For N = LBound(MySplit) To UBound(MySplit)
X = ActiveWorkbook.Name
Workbooks.Open (MySplit(N))
When I see the debug, it stops at the code Workbooks.Open (MySplit(N))
The file that its looking for exists in the location because I have to choose the file when it prompts me
Wondering if theres anyone that can help me out on what code to replace Thank you