![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Posts: 11
|
My problem is pretty straight forward. I am providing my own custom MsgBox like ("Delete?", vbYesNo) and on yes it executes:
Sheets(ActiveSheetNumber).Select ActiveWindow.SelectedSheets.Delete While on no it Ends the macro. Problem is when they press yes, a default delete comfirmation comes up, and if the push cancel here it causes an error in my macro. Can I get rid of this confirmation? (.. I would be willing to use it as an extra warning if I could make the cancel in the default exit my macro.) Thanks a bunch, Luke Campbell |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Posts: 363
|
Try:
application.displayalerts = False
__________________
It's never too late to learn something new. Ricky |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Apr 2002
Posts: 112
|
Hi,
Try adding this line of code before the 'delete' line: Application.DisplayAlerts = False It should work. |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Posts: 11
|
Works great. Thanks fellows.
Luke Campbell |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|