Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ibthaj Mansour   on Mar 22 In MS Office Category.

  
Question Answered By: Aakifah Khan   on Mar 22

Yes, you can. The code  is accessible in a collection, and you can certainly
change it.

However, can I suggest a possibly easier way ...

- Create a new workbook
- Copy the summary  sheet to it
- Delete any other sheets in it (i.e. the default "Sheet1", "Sheet2", etc)
- Save and close this workbook  as your summary.

This is all done in just a few lines of quite straightforward code. Manipulating
the vba  code object is much less straightforward.

An alternative is to leave the code in the summary workbook, but have it check
for the absence of a key worksheet  and just not do anything if the sheet isn't
there.

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Delete code after saving worksheet to a new workbook? Or get search suggestion and latest updates.


Tagged: