Hello,
I have a question in regard to saving the current workbook with a certain name.
The current code below that I'm using works OK as long as that workbook isn't opened by another user.
But sometimes when another user is still using the workbook, there's no warning that the workbook can't be saved because it's still being opened.
I just realised it at the end when checking the data whether it's been updated or not.
ActiveWorkbook.SaveAs Filename:="\\obcsvr\Share\Salesdata\Sales" & CurYearOnly & "Year" & CurMonNbr & "Month" & "ForSales" & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Application.DisplayAlerts = True
Is there a way to make the macro stop or give a warning that the file is being opened and can't proceed to the next command?
Thank you.
I have a question in regard to saving the current workbook with a certain name.
The current code below that I'm using works OK as long as that workbook isn't opened by another user.
But sometimes when another user is still using the workbook, there's no warning that the workbook can't be saved because it's still being opened.
I just realised it at the end when checking the data whether it's been updated or not.
ActiveWorkbook.SaveAs Filename:="\\obcsvr\Share\Salesdata\Sales" & CurYearOnly & "Year" & CurMonNbr & "Month" & "ForSales" & ".xlsx", _
FileFormat:=xlOpenXMLWorkbook, CreateBackup:=False
Application.DisplayAlerts = True
Is there a way to make the macro stop or give a warning that the file is being opened and can't proceed to the next command?
Thank you.