Read only program

Qroozn

Well-known Member
Joined
Mar 12, 2002
Messages
543
Good evening guys.
I have an excel program running.
What i want is to make it so the user can only use the program... but they can never actually save it. all changes made within the program will actually be saved to a seperate file on the c:.
and reopening the excel program will automatically rectify these links.

How can i limit all access to saving the program.?

TIA
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.
On 2002-03-17 21:25, Qroozn wrote:
Good evening guys.
I have an excel program running.
What i want is to make it so the user can only use the program... but they can never actually save it. all changes made within the program will actually be saved to a seperate file on the c:.
and reopening the excel program will automatically rectify these links.

How can i limit all access to saving the program.?

TIA

Placed into the ThisWorkbook module

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Cancel = True
End Sub

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Cancel = True
End Sub


Ivan
 
Upvote 0
Hi Qroozn


Part 2 of Ivans solution will work, but part one would stop the Workbook from being closed, I'm not sure if you want that.

Why not just make the file 'Read-only'?
 
Upvote 0
On 2002-03-17 23:33, Dave Hawley wrote:
Hi Qroozn


Part 2 of Ivans solution will work, but part one would stop the Workbook from being closed, I'm not sure if you want that.

Why not just make the file 'Read-only'?

Didn't check !!

Do what dave suggested Save workbook BUT
put password in for open as read only.
Then place this code in

Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
Dim Pwd
Pwd = InputBox("Enter password to save")
If Pwd <> "me" Then Cancel = True
End Sub

Ivan
 
Upvote 0

Forum statistics

Threads
1,213,561
Messages
6,114,312
Members
448,564
Latest member
ED38

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