+ Reply to Thread
Results 1 to 6 of 6

VBA to delete Formulas, Names, & Macros of another workbook, but to keep values

  1. #1
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Thumbs up VBA to delete Formulas, Names, & Macros of another workbook, but to keep values

    Dear Friends,

    Because, once my reports are generated & got printed, I just need to keep only the values. Hence, I want a code to do the following:

    I want to delete names, formulas, macros of another workbook. For example, A.xls is my codes workbook. From this file, I want to delete the names, formulas, macros (but to keep the values & formatting in tact) of another workbook (there must be a prompt for which .xls file, the names etc. to be deleted).

    All files are in a same folder.

    Thanking you and in anticipation,
    acsishere.
    Last edited by acsishere; 05-16-2009 at 03:03 PM.

  2. #2
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: VBA to delete Formulas, Names, & Macros of another workbook, but to keep values

    Dear Friends,

    Any solution?

    I hope someone will come forward.

    acsishere.

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

    Re: VBA to delete Formulas, Names, & Macros of another workbook, but to keep values

    is the code to produce the reports in the report workbook? If so maybe keep it in an addin then you won't need to remove the VBA which can be complicated and will only work if the VBA Project is not protected.

    Please Login or Register  to view this content.
    If you don't want to keep any names, replace the names part above with this
    Please Login or Register  to view this content.
    Hope that helps.

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

    Free DataBaseForm example

  4. #4
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Smile Re: VBA to delete Formulas, Names, & Macros of another workbook, but to keep values

    Dear Sir,

    Thanks for your code. I tried to execute that. I got a error message with the following code.

    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.
    which one is right? but both are not working. Besides, I want to run the code from another file. i.e. the code is in A.xls. then the formulas, names, macros are to be deleted for another workbook called XYZ.xls.

    If this is the case, what is to be done?

    Ofcourse, as you mentioned I need to retain Print_Area, Print_Titles. That's good.

    seeking your kind reply.

    acsishere.

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

    Re: VBA to delete Formulas, Names, & Macros of another workbook, but to keep values

    It should be Workbooks("A.xls")

  6. #6
    Registered User
    Join Date
    04-15-2008
    Location
    Tamil Nadu, India.
    MS-Off Ver
    Microsoft Office 2016
    Posts
    582

    Re: VBA to delete Formulas, Names, & Macros of another workbook, but to keep values

    Dear Sir,

    Thank you very much. Thanks a lot for the code.
    Good friends are hard to find, harder to leave, and impossible to forget.

    acsishere.

+ 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