ThrottleWorks
Excel Ninja
Hi,
I have a macro. This macro file is in XLSB format.
Macro opens a file with XLSM format, process it, ‘Save as’ in XLSX format.
User opens this file, makes it ‘shared’, multiple users start working on this file.
However, when users tries to save ‘SHARED’ file, he cannot save it.
He gets a pop-up as ‘Your changes could not be saved to ‘dummy name.xlsx’ because of a sharing violation. Try saving to a different file.
I am using below mentioned code to save the file. Please note, issue does not occur when file is not shared with multiple users.
Can anyone please help me in this.
I have a macro. This macro file is in XLSB format.
Macro opens a file with XLSM format, process it, ‘Save as’ in XLSX format.
User opens this file, makes it ‘shared’, multiple users start working on this file.
However, when users tries to save ‘SHARED’ file, he cannot save it.
He gets a pop-up as ‘Your changes could not be saved to ‘dummy name.xlsx’ because of a sharing violation. Try saving to a different file.
I am using below mentioned code to save the file. Please note, issue does not occur when file is not shared with multiple users.
Can anyone please help me in this.
Code:
Sub Save_Report()
Dim MyPath As String
Dim MyReportName As String
MyPath = ThisWorkbook.Worksheets("Mapping").Range("A6").Value
MyReportName = ThisWorkbook.Worksheets("Mapping").Range("A4").Value
ActiveWorkbook.SaveAs Filename:=MyPath & "\" & MyReportName & ".xlsx", FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
End Sub