You can not declare a variable as shared, however you can declare a procedure as shared by using the Friend keyword instead of Private or Public. You could therefore write a Get/Let procedure pare that can retrieve and set the variable you want to share, here is a simple example:
Code:
Dim lngTest As Long
Friend Property Get Test() As Long
Test = lngTest
End Property
Friend Property Let Test(ByVal newTest As Long)
lngTest = newTest
End Property
The property will be available to everything in your project that uses the class, however the calling program will not be able to retrieve or set the property.
Regards
Owain Williams