To create a global variable that can be accessed from any class of any addin, use the Public Class AddInUtils in Shell.vb.
Example of declaration:
Public Shared abcd As String = "xyz"
The above creates a global variable AddInUtils.abcd of a string type and assigns to it a value.
Example of usage:
MsgBox(AddInUtils.abcd)
Example of setting the value:
AddInUtils.abcd = "2z!"
Note: such variables cannot be overridden in custom addins.
See also