Workbook.GetAutomationObject Method (2007 System)

Called by the Visual Studio Tools for Office runtime to get an object that can be used by VBA code in the workbook.

Namespace:  Microsoft.Office.Tools.Excel
Assembly:  Microsoft.Office.Tools.Excel.v9.0 (in Microsoft.Office.Tools.Excel.v9.0.dll)

Syntax

'Declaration
Protected Overridable Function GetAutomationObject As Object
'Usage
Dim returnValue As Object 

returnValue = Me.GetAutomationObject()
protected virtual Object GetAutomationObject()
protected:
virtual Object^ GetAutomationObject()
protected function GetAutomationObject() : Object

Return Value

Type: System.Object
An object in a document-level customization that can be used by VBA code in the workbook.

Remarks

Override this method to return an instance of a class that you have exposed to VBA code in the workbook. For more information, see Calling Code in Document-Level Customizations from VBA.

.NET Framework Security

See Also

Reference

Workbook Class

Workbook Members

Microsoft.Office.Tools.Excel Namespace

Other Resources

Calling Code in Document-Level Customizations from VBA

How to: Expose Code to VBA in a Visual Basic Project

How to: Expose Code to VBA in a Visual C# Project

Walkthrough: Calling Code from VBA in a Visual Basic Project

Walkthrough: Calling Code from VBA in a Visual C# Project