Copy a named range from an installed add-in while in anothter work
Do it without selecting.
If the code is in the addin:
Thisworkbook.worksheets("sheet9999").range("CEMerg eDataHeader").copy _
destination:=activesheet.range("a1")
or be specific:
Workbooks("myaddin.xla").worksheets("sheet9999") _
.range("CEMergeDataHeader").copy _
destination:=workbooks("someotherworkbook.xls") _
.worksheets("sheet8888").range("a1")
Seth Schwarm wrote:
Excel XP
I want to copy (not paste, copy only) a named range located in an Add-In
(XLA) which is installed while in any other workbook file.
The Add-In I am referencing creates a new menu in Excel at Open of any
workbook. To run the subprocedure to copy the range - I select a command
from the menu which is created at Open as a result of the Add-In I have
mentioned.
I created a new macro to see what the VBA code would look like and this is
what it looks like:
Application.Goto Reference:="CEMergeDataHeader"
Selection.Copy
When I select the command in the menu created at Open - I receive Error 1004.
Please help.
Thank you - Seth
--
Dave Peterson
|