Thread: VBA Save
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default VBA Save

How about:

Private Sub cmdReturn_Click()
ActiveWorkbook.Close savechanges:=False
End Sub



Zaahir wrote:

Hi
I used the ffg code,
Private Sub cmdReturn_Click()
ActiveWindow.Close([savechanges]) = False
End Sub
but it returns an error ......
"Compile Error....................Assignment to constant not permitted"
is there a different code i can use to not save a doc or just not get excel
to ask for save?

Regards


--

Dave Peterson