View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Dean Dean is offline
external usenet poster
 
Posts: 93
Default Saving or not a spreadsheet

Patrick,

Sorry If I didn't make myself 100% clear in the first place. I'll try better
next time.
Please let me say thank you for all you help.

"Thank you for all your help"

That is absolutly wonderful.

Dean

"Patrick Molloy" wrote:

its what you asked for. Anyway, select the event's first line of code and F9
to set a break point
hit save, the when it breaks contimnue the code at the end sub line

a better way would be to use a developer's flag...
in a new module:

Option Explicit
Public DeveloperFlag As Boolean
Private Sub set_DeveloperFlag()
DeveloperFlag = True
End Sub

now wrap the event code like this...


If DeveloperFlag = False Then
Cancel = True
'etc
End If



"Dean" wrote:

Patrick,

Thanks for that however I now have another problem, how do I save it! With
the code in I can't save the spreadsheet.

Dean

"Patrick Molloy" wrote:

in the object ThisWorkbook's BeforeSave event
add these two lines
Cancel = True
ActiveWorkbook.Saved = True

if yuo want to be really mean, also add
ActiveWorkbook.Close False

"Dean" wrote:

I would like for users to be able to open my spreadsheets, use them but not
be able to save them, either using the "Save" or "Save as" commands.
Is it possible and if so how?

Thanks in advance.....

Dean