Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi! Before ending my macro I delete these two sheets but Excel gives me a warning prompt before deleting the sheets that I must OK. Is there a way to avoid the prompt and delete the sheets without interrupting the code? <start code Sheets("sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("sheet2").Select ActiveWindow.SelectedSheets.Delete <end code Thanks!! -- Brian Matlack ------------------------------------------------------------------------ Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508 View this thread: http://www.excelforum.com/showthread...hreadid=528630 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You can use the Application.DisplayAlerts property to suppress
the message. E.g., Application.DisplayAlerts = False ' your code here Application.DisplayAlerts = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Brian Matlack" wrote in message news:Brian.Matlack.25jokc_1143826502.0397@excelfor um-nospam.com... Hi! Before ending my macro I delete these two sheets but Excel gives me a warning prompt before deleting the sheets that I must OK. Is there a way to avoid the prompt and delete the sheets without interrupting the code? <start code Sheets("sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("sheet2").Select ActiveWindow.SelectedSheets.Delete <end code Thanks!! -- Brian Matlack ------------------------------------------------------------------------ Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508 View this thread: http://www.excelforum.com/showthread...hreadid=528630 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Chip Pearson Wrote: You can use the Application.DisplayAlerts property to suppress the message. E.g., Application.DisplayAlerts = False ' your code here Application.DisplayAlerts = True -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "Brian Matlack" wrote in message news:Brian.Matlack.25jokc_1143826502.0397@excelfor um-nospam.com... Hi! Before ending my macro I delete these two sheets but Excel gives me a warning prompt before deleting the sheets that I must OK. Is there a way to avoid the prompt and delete the sheets without interrupting the code? <start code Sheets("sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("sheet2").Select ActiveWindow.SelectedSheets.Delete <end code Thanks!! -- Brian Matlack ------------------------------------------------------------------------ Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508 View this thread: http://www.excelforum.com/showthread...hreadid=528630 Thanks Chip!! -- Brian Matlac ----------------------------------------------------------------------- Brian Matlack's Profile: http://www.excelforum.com/member.php...nfo&userid=350 View this thread: http://www.excelforum.com/showthread.php?threadid=52863 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Application.DisplayAlerts = False
set back to True at the end. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Brian Matlack" wrote in message news:Brian.Matlack.25jokc_1143826502.0397@excelfor um-nospam.com... Hi! Before ending my macro I delete these two sheets but Excel gives me a warning prompt before deleting the sheets that I must OK. Is there a way to avoid the prompt and delete the sheets without interrupting the code? <start code Sheets("sheet1").Select ActiveWindow.SelectedSheets.Delete Sheets("sheet2").Select ActiveWindow.SelectedSheets.Delete <end code Thanks!! -- Brian Matlack ------------------------------------------------------------------------ Brian Matlack's Profile: http://www.excelforum.com/member.php...fo&userid=3508 View this thread: http://www.excelforum.com/showthread...hreadid=528630 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Deleting sheets | Excel Programming | |||
deleting sheets 2&3 | Excel Discussion (Misc queries) | |||
Deleting Sheets | Excel Programming | |||
deleting sheets | Excel Discussion (Misc queries) | |||
Deleting sheets | Excel Programming |