excel vba

Forum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Excel VBA

Excel VBA

resolvedResolved · Low Priority · Version 2003

Alix has attended:
Excel VBA Intro Intermediate course

Excel VBA

What is Option Explicit?

RE: Excel VBA

Hi Alix

Option Explicit forces the user to make explicit declaration of all variables in a file using the Dim or ReDim statements.

If you attempt to use an undeclared variable name, an error occurs at compile time.

If used, the Option Explicit statement must appear in a the code before any other code statements.

Use Option Explicit to avoid incorrectly typing the name of an existing variable or to avoid confusion in code where the scope of the variable is not clear.

If you do not use the Option Explicit statement, all undeclared variables are of Object type.

Hope this helps

Carlos

 

Training courses

 

Training information:

Welcome. Please choose your application (eg. Excel) and then post your question.

Our Microsoft Qualified trainers will then respond within 24 hours (working days).

Frequently Asked Questions
What does 'Resolved' mean?

Any suggestions, questions or comments? Please post in the Improve the forum thread.


 

Excel tip:

Viewing two Excel 2010 Workbooks at the same time

Did you know you can view two Excel 2010 workbooks side by side? Very useful when comparing data without constantly having to go back and forth!

1) Open both Excel workbooks
2) Select Window then select Compare Side by Side with (Spreadsheet 2)
3) When you have finished, select Window again and click Close Side by Side

View all Excel hints and tips


Server loaded in 0.08 secs.