Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Saving the Workbook


Ariel Dugan;208753 Wrote:
Hi,

Its actually application.displayalerts that I was thinking of.

I would suggest that you alter the SaveAndExit sub as follows. I
tested it
this way and it works. Note, you may need to move the functionality
from
your Before_Close event into a regular module, and call it from both
the
SaveAndExit and from the Before_Close event.

Sub SaveAndExit()
Application.DisplayAlerts = False

''Call your other functionality that you want exectued before
saving...

ThisWorkbook.Save
ThisWorkbook.Close
End Sub



I've registered the following behaviour:
by the SaveAndExit menu command the alert is no more displayed, but the
wb don't closes (i.e. the Excel window don't closes). Moreover this
action corrupts some cell format (from numeric to date) (see picture
attached).

By the Excel window CloseButton nothing of this happens.

Thanks, Emiliano


+-------------------------------------------------------------------+
|Filename: FormatCorrupt.jpg |
|Download: http://www.thecodecage.com/forumz/attachment.php?attachmentid=70|
+-------------------------------------------------------------------+

--
eggpap

Excel 2003 on Vista HP System - can use VBA
------------------------------------------------------------------------
eggpap's Profile: http://www.thecodecage.com/forumz/member.php?userid=90
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=57272

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 Workbook tecklow Excel Discussion (Misc queries) 1 April 22nd 10 04:03 AM
saving 3 worksheets in a workbook to a separte workbook bigjim Excel Programming 6 November 5th 08 10:12 PM
Color Changes When Saving 2007 Workbook as 97 - 2003 Workbook Don Excel Discussion (Misc queries) 0 April 20th 08 04:51 AM
Saving a sheet in a workbook as .csv but not changing workbook name gloryofbach[_4_] Excel Programming 3 October 30th 05 08:50 PM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM


All times are GMT +1. The time now is 04:59 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"