Back to Blog
Excel autosave not working 20106/18/2023 You are currently use late binding with oExcel = CreateObject("Excel.Application"). You need to use Early Binding to get the benefit of intellisense. This code can be programmatically added to your target workbook but I doubt you would need to resort to this given you should be able to run the simple Save. MsgBox "You cannot use SaveAs to save this file",, "Save Cancelled!" This Event detects the SaveAs and cancels it Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) I thought it worth clarifying that you can use code inside the ThisWorkbook module to detect and handle a SaveAs if you are providing users with a choice. I think Inafiziger has solved your main issue, it should be a vanilla Save.Īs it was unclear to me exactly what your are doind (ie Visual Studio/VB/BA) then
0 Comments
Read More
Leave a Reply. |