Three Letter List

  • Thread starter Thread starter Whelan
  • Start date Start date
I was mostly just pulling your chain. :)

Yes, I do use Option Explicit, loops such as...
For iRow = iStartRow to iEndRow Step iRowIncr
....and I almost never use hardcoded range references (except as examples).
I primarily use named ranges.

Small loops such as...
For i = 1 To 10
....are fine for a few lines of code. I've never written 400 lines of code
in one sub or function. That's taboo. Either I'm doing something wrong or I
need to break it up into smaller tasks.

Error trapping, on the other hand, is another subject. After 28 years of
programming mostly engineering apps I've found it necessary to invoke the
"Law of Diminishing Returns": The more time I spend writing error-trapping
code the less time I have for problem solving. Most of the time if (when) an
error is trapped I need to debug something, thereby rendering the
error-trapping code obsolete. So I pick and choose those places needing
error trapping carefully.

Funny story regarding your mention of "400 lines down": Eleven years ago at
my last company I was asked to look at someone's VAX Basic (not VB) program
after he had left. It was on the order of 19,000 lines of code! Yes,
19,000... with No comments and No subroutine calls! Sections of code being
reused were cut and pasted appropriately rather than put into a sub or
function. Unbelievable!

Needless to say I declined to "add some features" to the program.
 
Well, if I wasn't due for a 'chain yanking',
then I'm just paid ahead now. <g>

--------------------------

Best Regards, Charlie

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Number to equivalent Letter 3
Calculation based on 2 seperate ranges 9
Offset in Formula 1
Cell to macro 1
count names 10
string values do not equal cells, then return msg 2
Issue with blanks and spaces 56
vba Syntax? 1

Back
Top