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

STL - Formerly Best Training Solutions Through Learning
TrustPilot
Excellent
Request Callback We will call you back
0207 987 3777 Call for assistance
Your Basket Basket is empty
excel vba

ResolvedVersion 2003

Anthony has attended:
PowerPoint Intermediate Advanced course
Excel VBA Intro Intermediate course
Project Intro Intermediate course
Upgrade to Office 2007 course

Excel VBA

What's the difference between Private and Publically declared variables?

RE: Excel VBA

Hi Anthony,

Thank you for your question.

A declared Public proceudre can be called from within other modules but a Private procedure is only available to other procedures in the same module.

Public Variables can be declared at the top of any standard Public module. These are available to all procedures in all modules.

Dim and private are used in the Declarations section which is outside the procedure itself. This is done in the Option Explicit. These will be available to all procedures in the same module.

I hope this answers your question.

Regards

Simon

Thu 23 Apr 2009: Automatically marked as resolved.

Excel tip:

Quickly create a list of numbers

The fill handle in Excel has many uses. If a number is typed into a cell and then the fill handle is used, the number will be copied from one cell to the next.

If you wish to create a list of numbers that increment by one at a time, hold down Ctrl in conjunction with using the fill handle - this should give you a series of numbers (e.g. 1, 2, 3 etc) rather than copying a single number.

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.1 secs.