declarations

Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

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

Declarations

resolvedResolved · Medium Priority · Version 2003

Joshua has attended:
Excel VBA Intro Intermediate course

Declarations

How do declarations work in the VBA scripting and when should they/could they be used?

RE: Declarations

Hi Joshua

Declaration statements are used to declare variables.

A variable declaration establishes its name, scope and data type. eg:

Dim UserName as String

They should be used to declare every variable you need in the code.

Furthermore you should always ensure that the Option Explicit statement is in the Declarations area of your code.

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:

Manually wrapping text

To manually wrap text, use the shortcut key Alt+Enter.

To cancel manual text wrapping, simply delete the new line.

View all Excel hints and tips


Server loaded in 0.08 secs.