Preventing file printing, saving changes to limit demo functionality
Preventing file printing, saving changes to limit demo functionality
(OP)
I would like to allow others to view my excel file but I want to prevent them from (1) printing the file and (2) saving any changes they might have made. I would like to utilize this in a demo version of Excel application. The goal is to have the users obtain full version if they find it useful and would like to continue using it. Are there any are other simple, effective and "tamper-proof" ways to limit Excel file functionality that could be utilized to create demo version of spreadsheet application? Thanks for any ideas.





RE: Preventing file printing, saving changes to limit demo functionality
RE: Preventing file printing, saving changes to limit demo functionality
CODE
Cancel = True
End Sub
However, if the user disables macros when opening the file, this macro will be disabled as well
Cheers,
Joerd
Please see FAQ731-376 for tips on how to make the best use of Eng-Tips.
RE: Preventing file printing, saving changes to limit demo functionality
--
www.bridgeart.net
RE: Preventing file printing, saving changes to limit demo functionality
from what i remember, simply remove all commands/menu items/toolbars from the workbook menu and save the workbook. might even want to protect the workbook after making the changes. highly recommend you experiment on a dummy workbook before embarking on actual workbook. how to remove sub-menus (when right clicking) needs to be disabled as well.
usually, the objectives you've stated are used by developers or knowledgeable users of excel. there are websites available that may provide you the details or examples of what you desire.
if further direction or references is needed, feel free to ask.
meanwhile, good luck!
-pmover
RE: Preventing file printing, saving changes to limit demo functionality
CODE
MsgBox "WARNING - printing disabled in demo version!"
Cancel = True
End Sub
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "WARNING - saving changes disabled in demo version!"
Cancel = True
End Sub
Private Sub Workbook_Open()
ActiveWorkbook.Unprotect "whatever_password"
Sheets("Main").Activate
Sheets("Main").Visible = True
Sheets("EnableMacros").Visible = False
ActiveWorkbook.Protect "whatever_password"
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
ActiveWorkbook.Unprotect "whatever_password"
Sheets("EnableMacros").Activate
Sheets("EnableMacros").Visible = True
Sheets("Main").Visible = False
ActiveWorkbook.Protect "whatever_password"
End Sub
If the user disables macros when opening the file, all sheets will be hidden, so the spreadsheet will not be very useful. Here is a sample file:
htt
Thanks again!
--
www.bridgeart.net
RE: Preventing file printing, saving changes to limit demo functionality
Good Luck
johnwm
________________________________________________________
To get the best from these forums read FAQ731-376 before posting
Steam Engine enthusiasts: www.essexsteam.co.uk