ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Copy a named range from an installed add-in while in anothter work (https://www.excelbanter.com/excel-programming/380642-re-copy-named-range-installed-add-while-anothter-work.html)

Dave Peterson

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


All times are GMT +1. The time now is 07:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com