View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
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