What's the safest way to NOT allow user from Saving

APPPRO

Active Member
Joined
Aug 6, 2002
Messages
256
I don't want the user the ever "Save"

Save As is OK.

Any thoughts?
 
Yep Brett, that's part of the equation.

No floppy.
Users have no network folder.
No printer, or if they must, have BeforePrint make an entry in a logfile.

As to ensuring macro use. I suggest setting up the file to hide all sheets, except a blank sheet. Hide upon close, hide upon save.

Workbook_Open will unhide the sheets, but only if the macro enabled. Oh, if you are really obsessive, have the macro check for username, computer name against a file kept on a network share.



_________________
This message was edited by stevebausch on 2002-10-21 21:15
 
Upvote 0

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
OK that macro works great to stop people from saving the file.
Now I wanted to add a Macro with a Click button with an auto "Save As" so the user doesn't have to bother. I wrote the following which works Except when I place it in the same workbook as the stop save one. The one below automatically Saves' As a Concentrate cell in the workbook Range "a1"

How can I combine the two????

Sub FILE_SAVE_AS
'
'

ActiveWorkbook.SaveAs FileName:=Range("a1"), FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End Sub
 
Upvote 0
I tried this but no go:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If Not SaveAsUI Then
Cancel = True
MsgBox "Changes to this workbook cannot be saved. Use SaveAs instead."
If SaveAsUI Then ActiveWorkbook.SaveAs FileName:=Range("a1"), FileFormat:=xlNormal, _
Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
CreateBackup:=False
End If
End Sub
 
Upvote 0
thxs but creating templates is exactly what I've been trying to get around. I have my own quasi template and really hate the way excel does it.
 
Upvote 0
Thxs guys for the macro - it works fine.

BUT I really really want to have a Save As macro. I wrote the following, but the stop Save macro supercedes it every time.

Any ideas on what to do?

Sub SaveCurrentWorkbook()
Set Name = Range("i41")

ThisWorkbook.SaveAs FileName:=Name

End Sub
 
Upvote 0
Maybe
Sub SaveCurrentWorkbook()
Application.EnableEvents=False
Set Name = Range("i41")
ThisWorkbook.SaveAs FileName:=Name
Application.EnableEvents=True
End Sub
 
Upvote 0

Forum statistics

Threads
1,215,891
Messages
6,127,606
Members
449,388
Latest member
macca_18380

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