Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Loading worksheets from an add in


Hi,
I am trying to convert my workbook to an add in. the workbook has
worksheets that are required for it to function correctly. I am havin
great difficulty in getting each of the worksheets to copy over to th
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 wan
each sheet copied to a new workbook sheet, can anyone help?

thank

--
cmpcwil
-----------------------------------------------------------------------
cmpcwil2's Profile: http://www.excelforum.com/member.php...fo&userid=3341
View this thread: http://www.excelforum.com/showthread.php?threadid=54032

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 770
Default Loading worksheets from an add in

cmpcwil2,

Workbooks("Mega.xla").Worksheets(1).Copy
after:=Workbooks("MyBook.xls").Worksheets(1)

hth,

Doug

"cmpcwil2" wrote in
message ...

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Loading... K Excel Discussion (Misc queries) 1 October 7th 07 09:37 PM
loading mallahd Excel Discussion (Misc queries) 2 May 25th 07 07:59 PM
Loading Bar Justin Philips Excel Programming 5 March 11th 06 04:58 PM
Add-ins not loading John F Excel Discussion (Misc queries) 2 February 17th 05 08:54 PM
Changing the Name of an Addin and loading worksheets off a network drive MikeCave[_2_] Excel Programming 0 June 4th 04 10:59 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"