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