F
Fox via OfficeKB.com
If I have any global variable and/or constants to declare, and they are
limited to one module, which is the better method to declare them:
Option Explicit
Dim myString as String
Const myConst as Integer = 1
Or
Option Explicit
Sub Main()
Public myString as String
Public Const myConst as Integer = 1
What are the advantages and/or limitations of each? And while we're at it,
what about declaring as variable as Static?
limited to one module, which is the better method to declare them:
Option Explicit
Dim myString as String
Const myConst as Integer = 1
Or
Option Explicit
Sub Main()
Public myString as String
Public Const myConst as Integer = 1
What are the advantages and/or limitations of each? And while we're at it,
what about declaring as variable as Static?