Want to disable save and save as- SOLVED

dsnbld

Board Regular
Joined
May 7, 2002
Messages
206
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, _
Cancel As Boolean)
a = MsgBox("Save Is Disabled", vbOKOnly)
If a = vbOK Then Cancel = True
End Sub

How do I get out of this file with my changes? Don't laugh.

**EDIT**
This what I ended up with:

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
If ThisWorkbook.Saved = False Then
Msg = "Saving Changes Is Disabled In Evaluation Version"
Msg = MsgBox(Msg, vbOKOnly + vbExclamation)
Cancel = True
'Interupt here when saving this code for the first time. I type "bug" to interupt.
'Debug (delete bug) and reset- then save process will continue.
'In future you can set ThisWorkbook Saved property to True to save changes.
End If
End Sub
This message was edited by dsnbld on 2002-05-12 20:52
This message was edited by dsnbld on 2002-05-15 06:50
 
On 2002-05-09 20:31, dsnbld wrote:
Thanks James. I've created a nice template that needs some VB code, and although I had wanted to do it myself, I'm just not ready.
Is it against forum rules to solicite help for hire?

Not if you use MrExcel. (sort of a by-product of this site if you like)

consult@mrexcel.com

(tell him Mark sent you, j/k :biggrin: )

If you want to persevere on your own though, like James says everything you want seems doable. You'll have to apply yourself and use this board, but you'll learn something.
 
Upvote 0

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Mark,
Understood. I have some folks waiting on this template, so I'll have to get some help this time around.
 
Upvote 0
Hi James,

You are right. Everything is not about $$$. The intention of this forum will be met only when the knowledge is shared.
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,716
Members
448,985
Latest member
chocbudda

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