View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Duncan[_5_] Duncan[_5_] is offline
external usenet poster
 
Posts: 290
Default Deny User Save Option

perhaps if you set the property to saved (make it think it is saved)
with:

thisworkbook.saved = true

That might stop it, not entirely sure though how that one works, I
would personally put thisworkbook.close(false) which should not save
it.

Test it though,

Duncan

Phil H wrote:

I have a workbook with all worksheets protected, located on a network. When
the user closes, Excel puts up a message, "Do you want to save..." giving the
user the option to save. I do not want the user to have this option. How do
I do this? Below is existing Auto_Close()

Sub Auto_Close()
Application.ScreenUpdating = False
Sheets("REP003").Select
Application.Goto Reference:=Range("A1"), Scroll:=True
Application.Goto Reference:=Range("A100"), Scroll:=False
ActiveWindow.Zoom = 85
Application.DisplayFullScreen = False
ActiveWindow.DisplayWorkbookTabs = True
ActiveWindow.DisplayHeadings = True
ActiveWindow.DisplayHorizontalScrollBar = True
Application.ScreenUpdating = True
End Sub