Message box warns for duplicate use of named ranges when copying s

N

nb0512

I created an Exel/VBA2003 application in which a copy of a worksheet is added
when the user pushes some button on the main form. In the worksheet which is
copied, I use a few named ranges. This works fine in 2003.
In 2007, however, a message box pops up that warns for duplicate use of the
named range in the new sheet. Since there are 5 ranges, it is quite annoying
to cancel these message boxes every time.

Can I programmatically prevent these msg boxes from popping up ?

Thanks !
 
N

nb0512

Found one answer on pcreview (gracias a Hector Miguel): add
Application.DisplayAlerts = False at the beginning of the sub and
Application.DisplayAlerts =True just before the end
This will stop the application from bothering you with any unwanted message
boxes

nb0512
 

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