Named Range override when copying worksheet

J

JimBob

I have a worksheet that I use as a "template" - layout, formatted correctly,
etc.. When I start my macro I copy that template to a working worksheet
where I start to populate data, formulas. The template has named ranges in
it. When I copy it I get a message asking me to copy teh named range, or
point to another reference soemwhere on my computer ... isn;t there an option
to override that and just accept the YES option for each named range when
copying a worksheet?
 
P

Paul Wilson

Jim,

At the beginning of your macro include the line:

Application.DisplayAlerts=False

This will suppress the dialog box. Excel will then assume you are saying
'Yes'.

It is also good practice to include the line at the end of your macro:

Application.DisplayAlerts=True

Have a look at the help file notes on this.

Regards
Paul
 
J

JimBob

Ohh ... yeah ... works great - thanks !

Paul Wilson said:
Jim,

At the beginning of your macro include the line:

Application.DisplayAlerts=False

This will suppress the dialog box. Excel will then assume you are saying
'Yes'.

It is also good practice to include the line at the end of your macro:

Application.DisplayAlerts=True

Have a look at the help file notes on this.

Regards
Paul
 

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