Test if Auto Outline is True

T

Tod

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
 
R

Rob Bovey

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 *
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top