Thread: saving option
View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default saving option

Alex,

This section of the code doesn't appear correct...
I believe you want... "If Cancel = True Then"
'-----------------
'If Cancel was clicked, turn events back on and cancel close,
'otherwise close the workbook without saving further changes

If Not Cancel = True Then '****
.Saved = True
Application.EnableEvents = True
If logReadOnly Then
.Close savechanges:=False
Else
.Close savechanges:=True
End If
Else
Application.EnableEvents = True
End If
End With
End Sub
'-------------------------

Jim Cone
San Francisco, USA