Excel Macro Utilities

These macros provide some useful functions for converting data formats or creating/modifying ERP waveform plots.  Excel macros are provided via cvs as *.bas and *.frm files. To use these files, start excel and goto 'tools - macro - visual basic editor (alt-F11)'.

When in the visual basic editor, goto 'file - import file' and select any of the *.bas or *.frm files. These files are loaded as a module or a form, respectively. Each module contains one or more 'sub' procedures, which can be selected from the drop-down menus over the main editor window. To run a sub procedure (or macro), use the run or debug menus.  Most of the procedure names are long enough to give some idea of what they are designed to do.  Please don't delete any procedures, as there are some dependencies between procedures within each module.  An example of one of the form macros is described in Excel Macro - Top70 ERP Plot.

CVS Download from eeg.sourceforge.net

A CVS client is required to checkout files from the CVS archive. CVS clients are available for every major operating system, eg:

To view the modules in this project, use the www interface to the CVS repository. The module to check out is 'excelVB'.

On linux or *NIX systems, the CVS repository can be checked out through anonymous (pserver) access with the following instructions (when prompted for a password, simply press Enter).

cvs -d:pserver:anonymous@eeg.cvs.sf.net:/cvsroot/eeg login
# Press enter here
cvs -z3 -d:pserver:anonymous@eeg.cvs.sf.net:/cvsroot/eeg co -P excelVB

Updates from within the module's directory do not need the -d parameter.

Caution

If it goes wrong, check through the sub procedure to verify that paths and filename variables etc. are suitable for your data. Some of these macros are associated with interactive forms to facilitate their use, but the forms are new to me and only provided here as "beta-versions".  The macros here have been developed from the ground up, on one system/platform only.  Despite efforts to "program" the computer properly, there will be something I've overlooked.  Should you feel so inclined, send an email describing the problem, to: darren**weber@radiology.ucsf.edu (replace ** with .).

For the Hackers

I would encourage anyone to get into macro programming excel - it can save a lot of time and get better results than point-&-click methods.  To better understand any aspect of the macros, when in the visual basic editor, place a cursor over any statement and hit the F1 key for context-sensitive help. If the statement is a VB keyword and the help system files are installed, you should get useful information. Take some time to learn the object heirarchy of excel and you might be amazed by the simplicity of programming excel ;-) Most of the macros here were developed using this on-line help and recording small snippets of excel activities. This is a fast-n-furious way to become a VB programmer from the ground up - anyone with some understanding of OOP or a small book on Visual Basic should get the hang of it. The visual basic editor should be available for most installations of excel (I have been working with MS Office97 and OfficeXP professional).

Warranties? Licences?

These macros are provided with no implied or express warranties. Please use them and distribute them as you will, entirely at your own risk (please abide by the GPL if you redistribute these utilties, see http:/www.gnu.org). Most of these macros been developed and tested on limited dataset specifications, please be careful to verify operations on your data. Some of the macros are under development. If you have any advice or comments, please send email to darren**weber@radiology.ucsf.edu (replace ** with .) ;-)