What does Option Explicit do in VBA? – David Musgrave

This article from David is pretty critical information for developers.

I have faced this in one my earlier projects, which was a pure VB development. Advantage of not being a GP Customization: It went thru’ rigorous testing. We normally do VBA customizations for GP either directly on the Client’s machine or in our development environment with all possible references setup.

So we don’t know what kind of errors we would face once we execute the code. It is always better to keep it in mind that Variables MUST be declared and always References MUST be checked before we execute the code.

And of course, keeping "Option Explicit" turned on will certainly do that and improve our consciousness.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s