Consulting

Results 1 to 4 of 4

Thread: Can complete VBA code be exported to a different WKBK

  1. #1

    Can complete VBA code be exported to a different WKBK

    I want hopefully, to export ALL modules, forms, objects etc in one workbook to another and if that can't be done than at least all modules and/or objects. This is so I can change code but leave the formulas/values etc in the main excel sheets. Basically it would need to delete all VBA code and copy, I guess from a text file to insert the new code, at least for modules and objects. Forms, I don't know how that can be done?
    thanks for your help! scott

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Just export the modules, File>Export in the VBIDE, and import them in the other workbook.

    Or open both workbooks, and drag-copy from one to the other project in the VBIDE.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    That would take to long to do each of 152 macros, forms and objects since I think I can only do one at a time. Can a macro be coded to take line by line and save it to a text file and another macro be coded to read the text file and load all those lines back into VBA. Same with objects. But what about teh Forms section?

  4. #4
    Regards,

    Jan Karel Pieterse
    Excel MVP jkp-ads.com

Posting Permissions

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