View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default run time error 1004

You don't need to copy and paste. Just make the values equal. Try this
instead...


Workbooks(wkb).Worksheets(CStr(Cell)).Range("WPCod eDescription").Value = _
Workbooks(WkbPrevious).Worksheets(CStr(Cell)).Rang e("WPCodeDescription").Value
--
HTH...

Jim Thomlinson


"Jake" wrote:

When running code that copies one named range from a workbook to a named
range in another workbook I get this run time error saying Select Method of
Range Class failed. If i copy the range manually i get the message: "A
formula or sheet you want to move or copy contains the name
'WPCodeDescription', which already exists on the destinatin sheet. Do you
want to use this version of the name?" Here is the code that causes the
error:

Workbooks(WkbPrevious).Worksheets(CStr(Cell)).Rang e("WPCodeDescription").Copy

Workbooks(wkb).Worksheets(CStr(Cell)).Range("WPCod eDescription").PasteSpecial
xlPasteValues

thanks for any help,
Jake