I am a supporter of
St. Joseph's hospice.
 If you find this site useful or if it helped you, consider a small donation to
St. Joseph's, please.

Information on
St. Joseph's

JustGiving - Sponsor me now!

 

VBA 02 My 2nd Program

Copy and steal good code wherever you can! Your first program should be just a copy, I suggest.

Good sites to look for code:
Pearson Software Consulting
Erlandsen Data Consulting - A good one for import/export of data
EverAge Consulting - Logging with VBA (example for object orientation)

Example: =CONCATENATE(A1:A9) does not work. Create this functionality with your own code: sbCat

Use OPTION EXPLICIT at the start of each of your modules:

OPTION_EXPLICITE

This forces you to declare of all variables explicitely. You will get warned about variables you misspelt, for example.

Comment!

'This function takes the input parameters x, y, and z, performs a
'blabla calculation and returns value “oops”.
'Version 0.1
'Date        Programmer Change
'22-Nov-2008 Bernd      Create

I indicate the quality of my macros with my version numbers: 0.1 is the first version, module tested, 1.0 would be good for general usage, 0.01 would be a prototype with some obvious drawbacks or similar. You can increase these version to 0.2, 1.1, etc. each time you apply a change. So everybody can see at one glance whether he has the most recent version and to which extent he might want to rely on it.

[Previous]  [Next]

Sulprobil   Get it done   Contact   Disclaimer   Download