Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 176
Default Supress Warning Message

I have the following code in a macro:

For i = numVars + 1 To 15
Sheets("numVar" & i).Select
ActiveSheet.Delete
Next

It automatically deletes some tabs in my workbook. Every time I run it I
get a warning message asking if I really want to delete each tab. Is there
any code I can place before I run this loop to supress these warning messages?

Thanks.
--
Regards,
Dave
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 31
Default Supress Warning Message

use this at the begning of your code

Application.DisplayAlerts = False



David Billigmeier wrote:
I have the following code in a macro:

For i = numVars + 1 To 15
Sheets("numVar" & i).Select
ActiveSheet.Delete
Next

It automatically deletes some tabs in my workbook. Every time I run it I
get a warning message asking if I really want to delete each tab. Is there
any code I can place before I run this loop to supress these warning messages?

Thanks.
--
Regards,
Dave


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 318
Default Supress Warning Message

Try this

Application.DisplayAlerts = False


"David Billigmeier" wrote:

I have the following code in a macro:

For i = numVars + 1 To 15
Sheets("numVar" & i).Select
ActiveSheet.Delete
Next

It automatically deletes some tabs in my workbook. Every time I run it I
get a warning message asking if I really want to delete each tab. Is there
any code I can place before I run this loop to supress these warning messages?

Thanks.
--
Regards,
Dave

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
Supress error message Jim Anderson Excel Discussion (Misc queries) 3 December 1st 04 12:55 AM
supress activex message on open workbook Clemens Hoogevonder Excel Programming 2 November 5th 04 04:52 PM
Supress "delete sheets" warning Hari[_3_] Excel Programming 0 September 14th 04 09:02 PM
Supress "delete sheets" warning Ron de Bruin Excel Programming 0 September 14th 04 08:59 PM
supress Solver message PB Excel Programming 0 November 19th 03 02:29 PM


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