View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default saving excel file

Stick these in Thisworkbook module.

Private Sub Workbook_BeforeClose(Cancel As Boolean)
ThisWorkbook.Saved = True
ThisWorkbook.Close
End Sub

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

To save the workbook with this code you must disable events then save.

Sub disable()
Application.EnableEvents = False
End Sub

Save workbook at this point.

Re-enable events and no further saving will take place.

Sub enable()
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP


On Sat, 10 May 2008 22:54:01 -0700, Kevin
wrote:

Hi,
I have some formulas and data which is shared for the users to get their
answers instantly. Is there any way not to allow users to save the excel
shared file if they make any changes. Is it possible if the users close the
file with some changes excel exit without prompting or saving??. i tried read
only, protect sheet etc. its of no use.
Thanks
Kevin