Global variables

Build 1501 on 14/Nov/2017  This topic last edited on: 3/Mar/2014, at 16:22

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

Global overridable variables

Global functions