[AccessD] TOP FIVE MOST COMMON VBA ERRORS AND THEIR SOLUTIONS

Bill Benson bensonforums at gmail.com
Sat Mar 14 21:13:26 CDT 2015


I like to add it to all the projects I inherit from other people just to
gain some perverse satisfaction from seeing how poor my predecessors have
been in declaring variables. Makes me feel better, I guess.

But seriously, if it is not a choice, then it's about as sensible a choice
as choosing to not wear a seat belt. For a few moments of uninterrupted
freedom while driving, you gain so little, and risk much more. If not using
Option explicit, every variable used lends itself to evil type coercion,
because the compiler makes them variants by default. I see zero benefit in
that, and allows one the "freedom" to write just plain bad code for you
(when you've later forgot even why you wanted a variable to be whatever it
ought to be) - or worse, someone who is already struggling enough to figure
out what the heck you were doing - to have to fix later.

Why fight the reasonableness of wearing your seat belt?
On Mar 14, 2015 6:28 PM, "Stuart McLachlan" <stuart at lexacorp.com.pg> wrote:

> Option Explicit is a great safety net.  It should be compulsory :)
>
> --
> Stuart
>
> On 14 Mar 2015 at 16:42, Susan Harkins wrote:
>
> > Well...
> >
> > I disgree with part of 5) -- some of that stuff is beneficial when you
> > start adding on and enhancing, changing... why take them out? Well,
> > the Debug.Print anyway... that's just routine for me and I see no
> > reason to take them out. They come in handy at all stages of the
> > project.
> >
> > Option Explicit is a choice. I think it's convenient, but it's a
> > choice.
> >
> > Susan H.
> >
>
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


More information about the AccessD mailing list