Global Level (Public)
A public module level variable is visible to all modules in the project.
These are also know as project level or global variables
You must insert these statements at the very top of your modules, before any procedures or functions.
Project scope variables must also be declared in a standard code module and not is a userform or class module.
Declaring a variable as Public inside a userform does not make it public. It is still private and only visible to that userform code module only.
Declaring as Global is exactly the same as Public and is only included for backwards compatibility.
Global g_sProjectLevel As String
Public g_sProjectLevel As String
Public Sub Procedure_Name()
© 2021 Better Solutions Limited. All Rights Reserved. © 2021 Better Solutions Limited TopPrevNext