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
Wilhelm has attended:
Excel VBA Intro Intermediate course
Excel VBA Intro Intermediate course
Excel
What are the difference between Global,Public and Private
RE: Excel
Hi Wilhelm
In Excel when declaring variables, Public is used to declare all Global variables (variables that are used at project/workbook level). They are usually declared at the top of a Module just under Option Explicit. eg
Public MyName As String
A Private variable can only be seen in the area that it has been declared in. This is used instead of the normal Dim to further emphasize that the declared variable must not be accesed from outside the declaration area. eg
Private MyAge As Byte
Hope this helps
Carlos
Fri 28 Nov 2008: Automatically marked as resolved.
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:The dual nature of toolbar buttonsMany toolbar buttons are dual purpose, though the two purposes are often linked in some way. For example, Align Left aligns a cell's contents to the left of the cell. However, hold down Shift and press the Align Left button: Excel aligns the cell contents to the right. |