Globals Class

When you create a VSTO Add-in using Visual Studio there is a Globals static class that gets generated automatically.
You can use this class to access several different components of the project at run-time.
This class is created for both document-level and application-level solutions.

Globals.ThisAddIn.Application 
Globals.ThisWorkbook
Globals.ThisDocument
Globals.Ribbons
Globals.FactoryGetVstoObject
Globals.FormRegions

public void Event_Application_WorkbookActivate( 
   Microsoft.Office.Interop.Excel.Workbook oWorkbook)
{
   ?? = new System.IntPtr(Globals.ThisAddIn.Application.Hwnd)
}

Globals.ThisAddIn.Application.WorkbookActivate +=
   Event_Application_WorkbookActivate;


© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext