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

vba

ResolvedVersion 2003

Dan has attended:
Excel VBA Intro Intermediate course

VBA

Can public variables be used in other workbooks?

RE: VBA

Dan

When you declare a variable as Public in a module this variable can be seen and shared by any project(workbook) open at the time.

However you should limit the use of these global variables(Sharing variables with other worksheets).

Global variables are very hard to keep track of, and you never know when another routine is using that value without careful tracking, which could take time and effort especially if there is a bug.

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:

Move to edge of data block

When data is held in a block, however large, use the Ctrl key with your cursors to move quickly to the far edge of the block. Works with all 4 direction keys.

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