Is there a way to copy a cell that also has a "name", and paste it somewhere else so that the new cell also has the same "name"?

link|improve this question
feedback

migrated from stackoverflow.com May 15 '10 at 1:17

This question came from our site for professional and enthusiast programmers.

1 Answer

This VBA code copies all the nakms from active workbook to destination. Not quite sure what your trying to do but this should get you started:

Sub Copy_All_Defined_Names()
   ' Loop through all of the defined names in the active
   ' workbook.
     For Each x In ActiveWorkbook.Names
      Workbooks("Destination.xls").Names.Add Name:=x.Name, _
         RefersTo:=x.Value
   Next x
End Sub

From here: http://support.microsoft.com/kb/213389

link|improve this answer
thanks guys, sorry didn't realise i was at the wrong place, thanks for the info all the same :) – lee May 14 '10 at 21:51
feedback

Your Answer

 
or
required, but never shown