ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Disabling Excel VBA Pop-ups... (https://www.excelbanter.com/excel-programming/317622-disabling-excel-vba-pop-ups.html)

Joey Lichtenstein

Disabling Excel VBA Pop-ups...
 
I have done this before, but I can't find ANYWHERE in the VBA help how I
did this.

What is the command in Excel VBA to make it not care when I want to delete
worksheets in a workbook in my code? For example, inside my code I am
trying to automate a:
ActiveWindow.SelectedSheets.Delete
And I don't want to have to deal with the OK/Cancel Window:
The selected sheet(s) will be permanantly deleted.

Thanks so much!

Joey

Visual Systems AB \(Martin Arvidsson\)

Disabling Excel VBA Pop-ups...
 
There is a property called DisplayAlerts, set this to false...

Don't forget to set it to true, when exiting excel egain...

I do think you will find it under the Excel app. object.

Regards

Martin
Arvidsson

"Joey Lichtenstein" skrev i meddelandet
...
I have done this before, but I can't find ANYWHERE in the VBA help how I
did this.

What is the command in Excel VBA to make it not care when I want to delete
worksheets in a workbook in my code? For example, inside my code I am
trying to automate a:
ActiveWindow.SelectedSheets.Delete
And I don't want to have to deal with the OK/Cancel Window:
The selected sheet(s) will be permanantly deleted.

Thanks so much!

Joey




Paul B

Disabling Excel VBA Pop-ups...
 
Joey, try this

Application.DisplayAlerts = False

'Your Code

Application.DisplayAlerts = True
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003


"Joey Lichtenstein" wrote in message
...
I have done this before, but I can't find ANYWHERE in the VBA help how I
did this.

What is the command in Excel VBA to make it not care when I want to delete
worksheets in a workbook in my code? For example, inside my code I am
trying to automate a:
ActiveWindow.SelectedSheets.Delete
And I don't want to have to deal with the OK/Cancel Window:
The selected sheet(s) will be permanantly deleted.

Thanks so much!

Joey




Pierre Archambault

Disabling Excel VBA Pop-ups...
 
Application.DisplayAlerts = False

Pierre


"Joey Lichtenstein" a écrit dans le message de
...
I have done this before, but I can't find ANYWHERE in the VBA help how I
did this.

What is the command in Excel VBA to make it not care when I want to delete
worksheets in a workbook in my code? For example, inside my code I am
trying to automate a:
ActiveWindow.SelectedSheets.Delete
And I don't want to have to deal with the OK/Cancel Window:
The selected sheet(s) will be permanantly deleted.

Thanks so much!

Joey




Joey Lichtenstein[_2_]

Disabling Excel VBA Pop-ups...
 
"Visual Systems AB \(Martin Arvidsson\)" wrote:

Thanks Martin! Exactly what I was looking for!


: There is a property called DisplayAlerts, set this to false...

: Don't forget to set it to true, when exiting excel egain...

: I do think you will find it under the Excel app. object.

: Regards

: Martin
: Arvidsson

: "Joey Lichtenstein" skrev i meddelandet
: ...
: I have done this before, but I can't find ANYWHERE in the VBA help how I
: did this.
:
: What is the command in Excel VBA to make it not care when I want to delete
: worksheets in a workbook in my code? For example, inside my code I am
: trying to automate a:
: ActiveWindow.SelectedSheets.Delete
: And I don't want to have to deal with the OK/Cancel Window:
: The selected sheet(s) will be permanantly deleted.
:
: Thanks so much!
:
: Joey




All times are GMT +1. The time now is 10:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com