Name conflict

J

John Turton

I want to copy a range from one workbook to another. Within the range is
a reference to a named range which exists in both workbooks. I want it
to use the name in the destination workbook. At the moment I get an
Excel message saying:

"A formula or sheet you want to move or copy contains the name 'name',
which already exists on the detination worksheet. Do you want to use
this version of the name?"

It gives a choice Yes or No. I don't want this message to appear and I
always want to choose "Yes".

I can't just send an enter keystroke because if there is a different
error such as the ranges being a different size I want to be alterted.

Any suggestions ?
Thanks
 
T

Tom Ogilvy

If you aren't doing any formula adjustments

Workbooks("Book2.xls").Worksheets("Sheet3").Range("A1:F32").Formula = _
ThisWorkbook.Worksheets("Sheet1").Range("A1:F32").Formula
 

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