How do you Store Code?

  • I have been collecting bits of VBA code form over the net and from books. at the moment they are all in text files and a mess, I would like to find an easy way to store these snippets of code in a logical way.


    How do others store their code snippets?


    Graham

  • Hi Graham
    I save a workbook (Examples) on the desktop and have a worksheet for each area of intrest eg Dates, Formating, lists, controls,ect
    Eack worksheet has standing data set up and next to it i list the examples.
    The example name hyperlinks to the range somewhere on the same sheet were i have pasted the code.
    Hope this helps.
    Regards.
    Nick

  • One tool I find invaluable is Visual Source Safe. This came with my Office 2000 Pro and also with Visual Studio 6.


    This software creates a repository for your code or any text type files. (even spreadsheets I believe)


    Basically, you check in an original copy of your file and to make changes you check it out. Kind of like a library, except you get to write all over the books without a penalty. The advantage that Visual Source Safe offers is that when you change a file after checking it out, it stores the differences. Thus, you can revert back to a previous version if your modifications generate bugs. This method of storing is less storage instensive than saving the same file and naming it *Version1.* and *Versio2.*


    Also, there are freeware/opensource versions of software that operate in a similar fashion. One that I have had experiences with was CVS. I used this about 5 years ago and it was a pain to install on a Windows box, however, they may have made it more Windoze friendly now:


    http://www.cvshome.org/


    It was designed for the Linux/Unix literate and required setup through a bash shell and a whole lot of messing around was required, especially gett ing the GUI to work using Tkl/Tk.


    I may even have a look at it again now that I've mentioned it. These are indispensable tools for programming though.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!