Article ID: 129898
Article Last Modified on 12/9/2003
Object.Property
Dim MyID As String
Sub MySub
MyModule.MyID = "This is module-level variable"
Dim MyID As String
MyID = "This is the procedure-level variable"
Debug.Print MyID
Debug.Print MyModule.MyID
End Sub
Public MyID
Sub MyID
'. . .
End Sub
In this case, change one of the names because modification with a common
module name would not resolve the ambiguity. Note that procedure names
are Public by default, but variable names are Private unless specified
as Public.
Keywords: kbprogramming kbprb KB129898