Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default w/book saving problem

My users uses a userform to enter data into w/book.but when that w/book
closes,its asking"Do you want to save the changes made to 'Book!.Xls'".,which
my users doesn,t want.
Whenever the userform closes or exits ,automatically it should save changes
without asking the question.
What code I should add to the userform to do the same?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200904/1

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,565
Default w/book saving problem

Put this in the UserForm code module.

Private Sub UserForm_Deactivate()
ActiveWorkbook.Save
End Sub



"tkraju via OfficeKB.com" <u16627@uwe wrote in message
news:94cd1334acc23@uwe...
My users uses a userform to enter data into w/book.but when that w/book
closes,its asking"Do you want to save the changes made to
'Book!.Xls'".,which
my users doesn,t want.
Whenever the userform closes or exits ,automatically it should save
changes
without asking the question.
What code I should add to the userform to do the same?

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200904/1



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default w/book saving problem

even after putting this code,its still asking whether to save it or not?

JLGWhiz wrote:
Put this in the UserForm code module.

Private Sub UserForm_Deactivate()
ActiveWorkbook.Save
End Sub

My users uses a userform to enter data into w/book.but when that w/book
closes,its asking"Do you want to save the changes made to

[quoted text clipped - 4 lines]
without asking the question.
What code I should add to the userform to do the same?


--
Message posted via http://www.officekb.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default w/book saving problem

The there is apparently some automation occuring after the UserForm closes
that the system is detecting. If the file has been saved to the User's
satisfaction at the time they want to close the workbook, then in the
workbook close statement, add
SaveChanges:=False, like this:

ActiveWorkbook.Close SaveChanges:=False

"tkraju via OfficeKB.com" wrote:

even after putting this code,its still asking whether to save it or not?

JLGWhiz wrote:
Put this in the UserForm code module.

Private Sub UserForm_Deactivate()
ActiveWorkbook.Save
End Sub

My users uses a userform to enter data into w/book.but when that w/book
closes,its asking"Do you want to save the changes made to

[quoted text clipped - 4 lines]
without asking the question.
What code I should add to the userform to do the same?


--
Message posted via http://www.officekb.com


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
Saving a work book as values and format only stew Excel Discussion (Misc queries) 3 September 3rd 09 08:31 PM
loss of fidelity error when saving excel work book Demetri GOlfos Excel Discussion (Misc queries) 1 April 13th 07 02:03 AM
Saving as. The whole book ore parts of it?? ElFrodo Excel Discussion (Misc queries) 2 February 6th 07 12:51 PM
Problem saving sequential numbers order book Blues[_3_] Excel Programming 1 April 13th 06 12:08 PM
my excel work book is NOT read onlyt says it is when saving to CD Soo Excel Discussion (Misc queries) 2 September 16th 05 05:29 PM


All times are GMT +1. The time now is 12:46 PM.

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

About Us

"It's about Microsoft Excel"