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