Disabling Save button (while enabling SaveAs) NO LONGER WORKS!!! (Insert cursing emoji here)

kgartin

Board Regular
Joined
May 6, 2010
Messages
207
Office Version
  1. 365
Platform
  1. Windows
What.
The.
HELL.

The code I'm using (which has been working flawlessly for years) DISABLES the save button (gives you a message to use "SAVEAS" if "SAVE" is clicked and then exits sub". When SAVEAS is clicked, it automatically saves the file with a predesignated name to a predesignated folder...or it's supposed to.

Now, no matter what happens, when the SAVE button is clicked, Excel opens the file menu and MAKES you select a filename and destination. Is this a new "feature"???🤬🤬🤬

It works fine as long as you press SaveAs, but if someone clicks save, all hell breaks loose. This is the code to disable save that USED to work but now is NOT working):

Code:
If Range("AA2") <> 0 And ActiveWorkbook.Name = "PRESS REPORT1" And Not SaveAsUI Then
    Cancel = True
    MsgBox "Please use the SAVEAS option.  Report not saved."
    Exit Sub
End If

...help
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
You should save the file with a password to modify. People can still open it up, but they can't save over tht versio.

1709156859727.png


1709156894744.png
 
Upvote 0
File SaveAs or Ctrl-F12
Use the Tools menu and select General Options
Add a password to "Password To Modify" (Enter it again when asked)
Don't check the "Read Only Recommend"

Users will be prompted for a password which they can ignore and open the file. They won't be able to save over the current file.
 
Upvote 0
Turns out it's an issue that occurs ONLY after double clicking a template to open. If it's not a template, or if you open a template without double-clicking, the code works perfectly.🤷‍♂️
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,207
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top