Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default Copy worksheet, code and all, into workbook?

Can I create a worksheet with command buttons, hyperlinks, and code in the
worksheet module, and then copy this entire sheet with everything intact
into a new workbook?

Ed


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Copy worksheet, code and all, into workbook?

Yes you can Ed

Sheets("Sheet1").Copy will create a new workbook with that sheet.

Only you must use buttons from the Control toolbox and place your code in the click event.
The button will always follow the click event and this is in the sheet module.

If you use a Forms button and assign a macro to it
The macro is in a normal module and not
in the sheet module so this will not work





--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ed" wrote in message ...
Can I create a worksheet with command buttons, hyperlinks, and code in the
worksheet module, and then copy this entire sheet with everything intact
into a new workbook?

Ed




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 194
Default Copy worksheet, code and all, into workbook?

Thank you, Ron. I'll work with this. If things start smoking, I'll yell
for help! 8)

Ed

"Ron de Bruin" wrote in message
...
Yes you can Ed

Sheets("Sheet1").Copy will create a new workbook with that sheet.

Only you must use buttons from the Control toolbox and place your code in

the click event.
The button will always follow the click event and this is in the sheet

module.

If you use a Forms button and assign a macro to it
The macro is in a normal module and not
in the sheet module so this will not work





--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Ed" wrote in message

...
Can I create a worksheet with command buttons, hyperlinks, and code in

the
worksheet module, and then copy this entire sheet with everything intact
into a new workbook?

Ed






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
Help...Code to copy sheet from closed workbook [email protected] Excel Discussion (Misc queries) 1 March 28th 07 08:52 PM
Copy Data from Workbook into specific Worksheet in other Workbook? kingdt Excel Discussion (Misc queries) 1 March 16th 06 06:55 PM
Copy empty cells from one workbook to another - Code Dave Peterson Excel Discussion (Misc queries) 1 September 23rd 05 02:10 PM
copy and paste using code from workbook to workbook bigdaddy3 Excel Discussion (Misc queries) 2 September 14th 05 11:06 AM
Copy VB code to other workbook? john Dijkman Excel Programming 3 July 21st 03 01:02 AM


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

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

About Us

"It's about Microsoft Excel"