+ Reply to Thread
Results 1 to 9 of 9

House Keeping of Macros

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    522

    House Keeping of Macros

    Dear Experts,
    In my endeavor to learn VBA, I have created more than 25 modules. Some macros created with the help of forum member are excellent piece of work and I use them often. My problem, I want to clean it up now but before doing that I want all of them to be saved as text or word so that I can copy and paste them at latter stage.
    Purpose of doing this is to have limited number of modules(lets say only three modules )
    1. For work - Module 1
    2. For personal stuff (that works fine and used often) – Module 2
    3. Learning Macros (I park only those which I create and use as hit and try) – Module 3
    Wondering if its worth thinking like this. Any guidance/Suggestion on this would be much appreciated.
    Best Regards/VKS
    Last edited by VKS; 01-14-2013 at 07:50 AM.

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: House Keeping of Macros

    I would re-name the modules:

    http://www.excelforum.com/excel-prog...le-in-vba.html

    and then Export them.
    Gary's Student

  3. #3
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    522

    Re: House Keeping of Macros

    Thanks a lot. I shall go and check the link.

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: House Keeping of Macros

    Hi,

    Are we talking about macros in your personal workbook here?

    It's really a case of what's important and useful to you. I must admit I tend to keep macros that do similar things in the same module, i.e. on a functional basis rather than your proposed occasion basis.

    If your question is about editing them then just use file export in the VBE and save all the resulting .bas files which you can then open with any text editor such as Word, Notepad etc.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    522

    Re: House Keeping of Macros

    Hello Richard, These are all in personal workbook and now i am finding it tough to locate useful macros thats why i want to save them all and start new modules. On second thought other option could be delete a few unwanted or failed macros a day but then i have this risk of having all 25 modules with one macro each

  6. #6
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: House Keeping of Macros

    Hi,

    There is nothing of course to stop you doing both and having the same macro in two sets of modules.

    You could have three modules using the 'Occasion' layout and another set of 25 or whatever modules for the 'Functionality' layout.

  7. #7
    Forum Contributor
    Join Date
    11-11-2012
    Location
    Muscat, Oman
    MS-Off Ver
    Office 365
    Posts
    522

    Re: House Keeping of Macros

    Dear Richard and Jacob,
    You have my stars for opening up my thought process.
    Best Regards/VKS

  8. #8
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: House Keeping of Macros

    I just copy the code from the modules and save them in word documents.
    that way i can save them under certain headings in a folder for easy access later
    i.e:
    E-mail
    pdf
    last used row
    find
    protection
    loops
    etc.etc

    just need to set the word doc to not look for corrections and then you can copy and paste easily.
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  9. #9
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: House Keeping of Macros

    I use txt files as they carry no formatting, are smaller file sizes than Word and I have found that Word sometimes causes problems with characters like the apostrophe and quotation marks. When pasted back into a module, Excel often does not recognize the character and errors out.

    Hope this helps.

    aboustta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

+ 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