I believe code similar to the following in the Workbook section of the code
should work
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
MsgBox "You are not allowed to save this workbook."
Cancel = True
End Sub
--
http://HelpExcel.com
1-888-INGENIO
1-888-464-3646
x0197758
"TheRobsterUK" wrote:
Is it possible to prevent someone from saving a spreadsheet? I have an
Excel app. that I am trying to sell and want to put a downloadable demo
version on my website, but don't want people to be able to save it.
I was thinking something along the lines of this, placed in the
ThisWorkbook VBA module:
Code:
--------------------
On ApplicationSave
MsgBox "Application cannot be saved"
Close Workbook
--------------------
I'm not sure of the exact syntax but would that work in principle?
Or does anyone have any other ideas for how I can create a 'trial'
version of the application which is disabled in some way so that people
still have to buy the full version in order to get full functionality?
Thanks
-Rob
--
TheRobsterUK
------------------------------------------------------------------------
TheRobsterUK's Profile: http://www.excelforum.com/member.php...fo&userid=9924
View this thread: http://www.excelforum.com/showthread...hreadid=375199