Sources for learning how to program VBA "properly".

  • Thread starter Thread starter Toby Erkson
  • Start date Start date
T

Toby Erkson

I've noticed that the MVP's responses* and web sites have VBA code that is
coded properly. Proper use of selection vs. activate, object creations,
what fields are necessary in a method/procedure, etc. I think I rely too
heavily on the macro recorder -- if you were to look at the history of my
VBA coding it would mostly look like a quilt of sewn together macro
recordings (forms and coding excluded). We know it adds stuff that isn't
necessary but how does one know what is necessary and what's not? There is,
of course, more to proper coding (like readability and code documentation,
of which I'm very good at!) but I want the focus to be on proper syntax and
grammar. Any good resources?

I want MVP-quality coding but simply continuing to program as I have been
won't do it if I keep [unknowingly] make the same mistakes. Don't worry,
I'm not attempting to qualify as a MVP (old German cars are my obsession), I
just want to write quality code.
Thanks!
--
Toby Erkson
Oregon, USA
WindowsXP, Excel 2003

*Generally the MVP will reply with such a statement, stating the correct way
to write the code is as given in their example.
 
Toby,

I learned the most initially from John Walkenbach's Power Programming with
Excel VBA. Available almost everywhere. Pick one here to match your version
of Excel:

http://j-walk.com/ss/books/index.htm

And don't worry - if you want to try to become an MVP, then you would
certainly be welcome.

HTH,
Bernie
MS Excel MVP
 
That's the first book I bought and it IS a great one! Thanks for the link,
the book on formulas looks like a good 'next purchase' item :-)
 
Back
Top