If IsWorkbookOpen("CONTRACT\CONTRACTLIST_Cement.xlsx") Then
x = 0
Else
Application.DisplayAlerts = False
ActiveWorkbook.Close savechanges:=True
Application.DisplayAlerts = True
End If
Hi, despite using the above code, the save as prompt still occasionally appears and affect the program. Does anyone know how to stop it completely? The problem is that after I click save as, it will alert me that it was still open.
Disable save prompt with VBA code in Excel 1. Press Alt + F11 to open a Microsoft Visual Basic for Application window. 2. Click Insert > Module to open a Module window, then copy the following VBA to the window. VBA: Close without saving... 3. Click Run button or F5 key on the keyboard to run this ...
Turn On or Off Download Save Prompt in Microsoft Edge. 1 Option One: To Turn On or Off Microsoft Edge Download Save Prompt in Download Settings. 2 Option Two: To Turn On or Off Microsoft Edge Download Save Prompt using a REG file EXAMPLE: Download prompt in Microsoft Edge OPTION ONE.
Right-click on the file In the options presented, make sure to un-check the option labeled: Always ask before opening this type of file From now on if you click on a file of that type, the file will bypass the automatic prompt and will open automatically. This works for me on Windows 7 machines running IE 10 and 11.
1. In the workbook you need to disable the Save & Save As functions, please press Alt + F11 keys simultaneously to open the Microsoft Visual Basic for Applications window. 2.
Try below code
Its always good to explcilty refer the workbook rather than ActiveWorkbook
Sub test()
If IsWorkbookOpen("CONTRACT\CONTRACTLIST_Cement.xlsx") Then
x = 0
Else
Application.DisplayAlerts = False
ThisWorkbook.Save
ThisWorkbook.Close False
Application.DisplayAlerts = True
End If
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With