98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel VBA Training and help » Excel
Excel
Resolved · Low Priority · Version 2003
Scott has attended:
Excel VBA Intro Intermediate course
Excel
how do you declare a public variable
RE: excel
Hi Scott
A public variable is a variable that can be accessed by all the sections of code in a project.
One example of the use of a Public variable is data being entered on a form that needs to be moved to a module.
As a good coding practice you should declare the public variable in the Option Explicit area of the code page
To declare a Public variable you use the following code
Public MyVariable As String
Hope this helps
Carlos
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
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Quickly hide and unhide rows and columnsUse the keyboard shortcut Ctrl+9 to hide selected rows and Ctrl+0 to hide selected columns. The good thing about this shortcut is that you do not need to select entire rows or columns. For example, select B3:D3 then press Ctrl+0 to hide columns B to D. |