Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically Confirm Deleting Charts

Hi All,

I'd like to clean all the created charts after analysis,
so I record a macro to delete the charts one by one.

The problem is: there will always popup a msg box asking
me to confirm deleting the charts.

Is there a way to disable the confirming deleting msg?

Thanks in advance

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Automatically Confirm Deleting Charts

Hi
try

application.displayalerts=false
'your deletion code
application.displayalerts=true

-----Original Message-----
Hi All,

I'd like to clean all the created charts after analysis,
so I record a macro to delete the charts one by one.

The problem is: there will always popup a msg box asking
me to confirm deleting the charts.

Is there a way to disable the confirming deleting msg?

Thanks in advance!


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Automatically Confirm Deleting Charts

fatfish wrote:

Hi All,

I'd like to clean all the created charts after analysis,
so I record a macro to delete the charts one by one.

The problem is: there will always popup a msg box asking
me to confirm deleting the charts.

Is there a way to disable the confirming deleting msg?

Thanks in advance!



Put this at the start of *every* macro you record:

With Application
.Calculation = xlManual
.ScreenUpdating = False
.DisplayAlerts = False
End With

And this at the end:

With Application
.Calculation = xlAutomatic
.ScreenUpdating = True
.DisplayAlerts = True
End With

It's the DisplayAlerts stuff that will solve your problem.


PS: Please don't thank people in advance. It's more polite (and more
motivating) to thank them afterwards.

--
Amedee Van Gasse

To top-post is human, to bottom-post and snip is sublime.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatically Confirm Deleting Charts

Hi Frank & Amedee,

Thanks!
Both of them works very well!!

Amedee's code also disable the screenupdating, which makes
the macro "cleaner"! ;)
and thanks for your suggestion of "No thanks in advance" ! :P

Best Regards,
Fatfis

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 102
Default Automatically Confirm Deleting Charts

fatfish wrote:

Hi Frank & Amedee,

Thanks!
Both of them works very well!!

Amedee's code also disable the screenupdating, which makes
the macro "cleaner"! ;)
and thanks for your suggestion of "No thanks in advance" ! :P

Best Regards,
Fatfish


---
Message posted from http://www.ExcelForum.com/


Thank you for thanking me. Now nothing can spoil my day! :)

--
Amedee Van Gasse

To top-post is human, to bottom-post and snip is sublime.
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
getting rid of the "confirm delete" dialogue box when deleting a s Bernard Excel Discussion (Misc queries) 5 July 3rd 09 11:49 PM
Automatically deleting macros David New Users to Excel 3 November 14th 08 05:14 PM
link excel charts to web pages and update charts automatically Signguy Charts and Charting in Excel 1 April 22nd 08 08:29 PM
Confirm before deleting a worksheet? edeil Excel Discussion (Misc queries) 1 January 28th 06 02:44 AM
Deleting charts on a sheet John Excel Programming 2 May 13th 04 05:15 AM


All times are GMT +1. The time now is 03:48 PM.

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"