option explict

azzic7
09-10-2003, 03:04 AM
why is option explict needed to be added to every form and module?

can some1 explain

wildfire1982
09-10-2003, 03:07 AM
So that all of the variables must be given a type and so it does not just use the default variant which can be dangerous and is bad practice.

Garmour
09-10-2003, 03:11 AM
It bascially forces you to explicitly declare all of your variables before use.

You aren't forced to give them a type though.

It's good for catching spelling mistakes in your variable names.

azzic7
09-10-2003, 06:10 AM
k thanx for the info guyz!

blindwig
09-10-2003, 10:47 AM
why is option explict needed to be added to every form and module?

can some1 explain
When you have a question like this, usually the best first step is to type the command (in this case "Option Explicit") in the IDE and then hit F1, which will bring up the MSDN library, which has explinations for all the legal commands and their syntax, as well as examples and "see also" links. Try it out - it's really a great resource!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum