ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Test if Auto Outline is True (https://www.excelbanter.com/excel-programming/276238-test-if-auto-outline-true.html)

Tod

Test if Auto Outline is True
 
My code uses Auto Outline like this:

ActiveSheet.Range("A2:T50").AutoOutline

However, if the sheet is already outlined it displays a
prompt. I'd rather is skip the statement if the sheet is
already outlined. Is there a statement I can use to first
test if the sheet is already outlined?

tod

Rob Bovey

Test if Auto Outline is True
 
Hi Tod,

This should do it:

Application.DisplayAlerts = False
ActiveSheet.Range("A2:T50").AutoOutline
Application.DisplayAlerts = True

--
Rob Bovey, MCSE, MCSD, Excel MVP
Application Professionals
http://www.appspro.com/

* Please post all replies to this newsgroup *
* I delete all unsolicited e-mail responses *


"Tod" wrote in message
...
My code uses Auto Outline like this:

ActiveSheet.Range("A2:T50").AutoOutline

However, if the sheet is already outlined it displays a
prompt. I'd rather is skip the statement if the sheet is
already outlined. Is there a statement I can use to first
test if the sheet is already outlined?

tod





All times are GMT +1. The time now is 06:51 AM.

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