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

writing code lines

ResolvedVersion 2003

Erika has attended:
Excel VBA Intro Intermediate course

Writing Code lines

When do you use Public as a String instead of Dim?

Dim vs Public in Variable declaration

Hi Erika

When declaring variables you use the Public setting when you want the variable to be seen and be accessible by all procedures and modules in a project (eg Forms).

A Dim declaration sets the variable to be seen only by the procedure or module that contains it.

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:

Line breaks in a cell

You can control the line breaks for multiple-line headings or labels in your Microsoft Excel worksheet, just like you do in Microsoft Word. Here's how to do it.

Click the cell where you want the label or heading to appear.
Type the first line of information.
Press ALT+ENTER.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.