Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
TheRobsterUK
 
Posts: n/a
Default Disabling Save Function


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

  #2   Report Post  
galimi
 
Posts: n/a
Default

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


  #3   Report Post  
TheRobsterUK
 
Posts: n/a
Default


That seems to do the trick, thanks.

Is is possible to do something similar with the Print function? I.e.
disable it for that workbook. My app. has a report generation feature
that I also want to be able to disable for the trial version.

I've tried altering what you posted for the Save function so that it
works for the Print function as well but not had any luck.

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Restore the auto save function, it was a life saver. JJB Excel Discussion (Misc queries) 1 May 20th 05 01:25 PM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
Excel :Save date function Elodie Excel Worksheet Functions 1 November 25th 04 04:25 PM
need to save values from a function before it changes Ron Excel Worksheet Functions 1 October 29th 04 06:29 AM


All times are GMT +1. The time now is 05:22 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"