Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Message still appears with DisplayAlerts = False & SaveChanges:=Fa

In an Excel 2003 macro, I have 3 workbooks, each of which I close with this
code:

ActiveWindow.Close SaveChanges:=False

This has run for months without incident but now, in each instance, pops up
a form entitled "Document modified," with the prompt:
"The active document has been changed. Save Changes?"

So, I added, before the Close method: "Application.DisplayAlerts = False".

The message still appears when it hits the Close.

The macro was originally written in Excel 2003 & all the workbooks invloved
are Excel 97-2003 .xls files.
However, I am now using Excel 2007, though the primary user of the workbooks
& the macro is still using 2003.

I had made some changes to the macro through my Excel 2007. It had the .xls
open in Compatibility Mode & I saved it as .xls format, not 2007 .xlsm.
Windows Explorer shows it as file type "Excel 97-2003 Worksheet."

Is there something in the 2003 - 2007 relationship that might cause this
problem?

Thanks,
Will
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Message still appears with DisplayAlerts = False & SaveChanges:=Fa


If you are not saving changes then you can also add this line:


VBA Code:
--------------------


Activeworkbook.Saved=TRUE
--------------------



Excel will think it has already been saved and you should not be
alerted.



wpiet;661538 Wrote:

In an Excel 2003 macro, I have 3 workbooks, each of which I close with
this
code:

ActiveWindow.Close SaveChanges:=False

This has run for months without incident but now, in each instance,
pops up
a form entitled "Document modified," with the prompt:
"The active document has been changed. Save Changes?"

So, I added, before the Close method: "Application.DisplayAlerts =
False".

The message still appears when it hits the Close.

The macro was originally written in Excel 2003 & all the workbooks
invloved
are Excel 97-2003 .xls files.
However, I am now using Excel 2007, though the primary user of the
workbooks
& the macro is still using 2003.

I had made some changes to the macro through my Excel 2007. It had the
xls
open in Compatibility Mode & I saved it as .xls format, not 2007 .xlsm.
Windows Explorer shows it as file type "Excel 97-2003 Worksheet."

Is there something in the 2003 - 2007 relationship that might cause
this
problem?

Thanks,
Will


--
Simon Lloyd

Regards,
Simon Lloyd
'Excel Chat' (http://www.thecodecage.com/forumz/chat.php)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=184739

Excel Live Chat

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Message still appears with DisplayAlerts = False & SaveChanges

Thanks, Simon. That took care of it.
Any idea why that was popping up, when it never had before in all the months
it's been running?
--
Will


"Simon Lloyd" wrote:


If you are not saving changes then you can also add this line:



VBA Code:
--------------------



Activeworkbook.Saved=TRUE


--------------------



Excel will think it has already been saved and you should not be
alerted.




wpiet;661538 Wrote:

In an Excel 2003 macro, I have 3 workbooks, each of which I close with
this
code:

ActiveWindow.Close SaveChanges:=False

This has run for months without incident but now, in each instance,
pops up
a form entitled "Document modified," with the prompt:
"The active document has been changed. Save Changes?"

So, I added, before the Close method: "Application.DisplayAlerts =
False".

The message still appears when it hits the Close.

The macro was originally written in Excel 2003 & all the workbooks
invloved
are Excel 97-2003 .xls files.
However, I am now using Excel 2007, though the primary user of the
workbooks
& the macro is still using 2003.

I had made some changes to the macro through my Excel 2007. It had the
.xls
open in Compatibility Mode & I saved it as .xls format, not 2007 .xlsm.
Windows Explorer shows it as file type "Excel 97-2003 Worksheet."

Is there something in the 2003 - 2007 relationship that might cause
this
problem?

Thanks,
Will


--
Simon Lloyd

Regards,
Simon Lloyd
'Excel Chat' (http://www.thecodecage.com/forumz/chat.php)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=184739

Excel Live Chat

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default If you are not saving changes then you can also add this line:VBA

Awesome hint. Thankyou

On Thursday, March 04, 2010 3:55 PM wpiet wrote:


In an Excel 2003 macro, I have 3 workbooks, each of which I close with this
code:

ActiveWindow.Close SaveChanges:=False

This has run for months without incident but now, in each instance, pops up
a form entitled "Document modified," with the prompt:
"The active document has been changed. Save Changes?"

So, I added, before the Close method: "Application.DisplayAlerts = False".

The message still appears when it hits the Close.

The macro was originally written in Excel 2003 & all the workbooks invloved
are Excel 97-2003 .xls files.
However, I am now using Excel 2007, though the primary user of the workbooks
& the macro is still using 2003.

I had made some changes to the macro through my Excel 2007. It had the .xls
open in Compatibility Mode & I saved it as .xls format, not 2007 .xlsm.
Windows Explorer shows it as file type "Excel 97-2003 Worksheet."

Is there something in the 2003 - 2007 relationship that might cause this
problem?

Thanks,
Will



On Thursday, March 04, 2010 4:19 PM Simon Lloyd wrote:


If you are not saving changes then you can also add this line:


VBA Code:
--------------------


Activeworkbook.Saved=TRUE
--------------------



Excel will think it has already been saved and you should not be
alerted.



wpiet;661538 Wrote:
In an Excel 2003 macro, I have 3 workbooks, each of which I close with
this
code:

ActiveWindow.Close SaveChanges:=False

This has run for months without incident but now, in each instance,
pops up
a form entitled "Document modified," with the prompt:
"The active document has been changed. Save Changes?"

So, I added, before the Close method: "Application.DisplayAlerts =
False".

The message still appears when it hits the Close.

The macro was originally written in Excel 2003 & all the workbooks
invloved
are Excel 97-2003 .xls files.
However, I am now using Excel 2007, though the primary user of the
workbooks
& the macro is still using 2003.

I had made some changes to the macro through my Excel 2007. It had the
.xls
open in Compatibility Mode & I saved it as .xls format, not 2007 .xlsm.
Windows Explorer shows it as file type "Excel 97-2003 Worksheet."

Is there isomething in the 2003 - 2007 relationship that might cause
this
problem?

Thanks,
Will


--
Simon Lloyd

Regards,
Simon Lloyd
'Excel Chat' (http://www.thecodecage.com/forumz/chat.php)
------------------------------------------------------------------------
Simon Lloyd's Profile: 1
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=184739

Excel Live Chat



On Friday, March 05, 2010 11:53 AM wpiet wrote:


Thanks, Simon. That took care of it.
Any idea why that was popping up, when it never had before in all the months
it is been running?
--
Will


"Simon Lloyd" wrote:




wpiet;661538 Wrote:




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
Cannot Update Links Message is False but Always Appears [email protected] Excel Discussion (Misc queries) 0 April 20th 09 02:50 PM
VBA - Do Loop or SaveChanges = false Dan Excel Discussion (Misc queries) 1 January 23rd 09 05:54 PM
Problem with Activeworkbook.Close SaveChanges:=False Ron McCormick Excel Programming 4 July 31st 06 11:00 AM
Where to put DisplayAlerts = False Joe Fish Excel Programming 2 October 22nd 05 09:13 PM
Can't Set DisplayAlerts to False Mark Driscol Excel Programming 2 April 2nd 04 12:28 PM


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