Hi missmr,
You can indeed transfer code from one workbook to another but, since the code's already in the workbook, it's more straightforward to do it this way. Any code attached to the worksheets you've deleted will also be deleted when you delete those sheets. All that might remain (apart from your saved worksheet's code) is code in userforms & other code modules, if you have them. Those, too, could be deleted via vba - but you'd have to give vba trusted access to the vba project object model - and that might not be advisable.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
|