Rekent/Charles,
I'm confused as to what you fellows are trying/actually tried to do:
"My experience, tonight, disagrees. Perhaps I am just tired. I tried setting the value of a public variable declared outside a procedure and it blanked when I ran the second procedure trying to access that value."
Remember the ThisDocument.Module of the VB Project is a Special Class Object module (not a standard module).
If you have this code in a VB Project ThisDocument Module:
Code:
Option Explicit
Public p_strPublicTest As String
Sub Document_Open()
p_strPublicTest = "Testing one, two, theee ..."
End Sub
You can test it in the ThisDocument module using:
Code:
Sub Test()
MsgBox p_strPublicTest
End Sub
and in a standard module using:
Code:
Option Explicit
Sub Test()
MsgBox ThisDocument.p_strPublicTest 'This is the public property of the ThisDocument Class
End Sub
If you have this code in as Standard module:
Code:
Option Explicit
Public Const PublicTest = "Test Constant"
Public p_strPublicTest As String
Sub AutoOpen()
p_strPublicTest = "Testing one, two, three ..."
End Sub
You can test it in that module, another standard module, a userform class module, the this document module, or any other class associated with the project using:
Code:
Sub test()
MsgBox PublicTest
MsgBox p_strPublicTest
End Sub