+ Reply to Thread
Results 1 to 7 of 7

Delete code when saving the file

  1. #1
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Delete code when saving the file

    Hello again,

    I have posted already the problem to delete the code when sending a sheet via email and I have found the solution to the problem.

    I tried to do the same when saving the file to specific folder, but i am facing problem.
    The code that I am using now is:

    Please Login or Register  to view this content.
    Can I add somewhere in this code the lines that will delete the code form the file?

    Please Login or Register  to view this content.
    Last edited by Bob@Sun; 01-26-2010 at 04:43 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Delete code when saving the file

    Can't you call the macro that deletes the code that you have in the other reply?
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Delete code when saving the file

    Do you mean this macro?

    Please Login or Register  to view this content.
    I tried but probably I am not calling the macro in the right place because it is not working.

    Where should I add the Call DeleteAllVBACode function in my code?

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Delete code when saving the file

    I would recommend that you test on a backup copy. Try
    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor JeanRage's Avatar
    Join Date
    03-02-2009
    Location
    Nice, France
    MS-Off Ver
    Excel 2003
    Posts
    705

    Re: Delete code when saving the file

    Hi,

    As a quick reminder, do not forget in VBE
    Tools>References
    Microsoft Visual Basic for Applications Extensibility ...

    HTH

  6. #6
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Delete code when saving the file

    For others' reference,this is a continuation of an earlier post

  7. #7
    Forum Contributor Bob@Sun's Avatar
    Join Date
    09-03-2009
    Location
    Montuak, Usa
    MS-Off Ver
    Excel 2007
    Posts
    438

    Re: Delete code when saving the file

    Thanks to all! I got it to work

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1