Consulting

Results 1 to 4 of 4

Thread: Solved: Delete all code after save

  1. #1

    Solved: Delete all code after save

    Hi

    I have a workbook template with modules/forms etc

    I'd like to force the user to save the workbook using a different name
    and then delete the code (modules & forms). This is to make sure the saved filesize isn't too big.

    I've seen some code that uses VBIDE but am too much of a novice to understand and am confused as to how to use it in this context.

    Any help appreciated

    thanks
    Jon

  2. #2
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Hi Jon, I don't want to distract from your actual project but as an alternative why not put all the code in an addin so you can run it on any open workbook but it is not attached to that workbook in any way.

    Check out Johnske's article on creating addins in the Articles section.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  3. #3
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Here's a kb entry by Jake that might help if the addin is not an option:

    http://vbaexpress.com/kb/getarticle.php?kb_id=93
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  4. #4
    Thanks Lucas - the KB aticle works well.

    regards

    Jon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •