#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default VBA Save

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default VBA Save

Thanx david, works beautifuly

"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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save, save as, page setup dimmed out in unprotected excel sheet? ccKeithJ Excel Discussion (Misc queries) 3 December 14th 07 07:07 PM
disable save and saveas from menubar and save via command button Steve E Excel Programming 5 September 13th 06 11:51 PM
Disable save, save as, but allow save via command button TimN Excel Programming 10 September 1st 06 07:05 PM
How to diasble save and save as menu but allow a save button hon123456 Excel Programming 1 June 12th 06 09:50 AM
Totally Disabling (^ save ) (Save as) and Save Icon – Which code do I use: harpscardiff[_10_] Excel Programming 8 November 10th 05 12:24 PM


All times are GMT +1. The time now is 12:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"