Hi, I use to run the following code on my excel 2016 Mac with no issue.
Sub SaveInvWithNewName()
Dim NewFN As Variant
PostToRegister
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "/Users/Whiston/Documents/Aarden Asia/AA2020/Inv 20-" & Range("C9").Value & " " & Range("B3").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
However, after upgrading to a new Mac and Excel 365, I haven't be able to run the macro.
"Run-Time error "1004"
Your changes cannot be saved to "INV 20-xxx.xlsx"because of sharing violation. Try saving to a different file"
"I think the issue might be that I am saving directly to the iCloud Drive and not the stated path in the code.
thanks for the advise.
Sub SaveInvWithNewName()
Dim NewFN As Variant
PostToRegister
' Copy Invoice to a new workbook
ActiveSheet.Copy
NewFN = "/Users/Whiston/Documents/Aarden Asia/AA2020/Inv 20-" & Range("C9").Value & " " & Range("B3").Value & ".xlsx"
ActiveWorkbook.SaveAs NewFN, FileFormat:=xlOpenXMLWorkbook
ActiveWorkbook.Close
NextInvoice
End Sub
However, after upgrading to a new Mac and Excel 365, I haven't be able to run the macro.
"Run-Time error "1004"
Your changes cannot be saved to "INV 20-xxx.xlsx"because of sharing violation. Try saving to a different file"
"I think the issue might be that I am saving directly to the iCloud Drive and not the stated path in the code.
thanks for the advise.