Name conflict

  • Thread starter Thread starter John Turton
  • Start date Start date
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
 
If you aren't doing any formula adjustments

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