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 Loading worksheets from an add in

ThisWorkbook refers to the book running the code (your addin in this case) so
you should be able to do something like...

ThisWorkbook.Sheets(1).Copy Activeworkbook.Sheets(1)

To copy sheet 1 from the addin to the active workbook.
--
HTH...

Jim Thomlinson


"cmpcwil2" wrote:


Hi,
I am trying to convert my workbook to an add in. the workbook has 3
worksheets that are required for it to function correctly. I am having
great difficulty in getting each of the worksheets to copy over to the
opening workbook when installed as an add in.

tried commands such as
Workbooks("Mega.xla").Sheets(1).Copy
for each sheet but this copies each sheet to a new workbook, I want
each sheet copied to a new workbook sheet, can anyone help?

thanks


--
cmpcwil2
------------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...o&userid=33411
View this thread: http://www.excelforum.com/showthread...hreadid=540324