Compartir a través de


WorksheetBase.GetAutomationObject Method

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

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

Syntax

'Declaration
Protected Overridable Function GetAutomationObject As Object
protected virtual Object GetAutomationObject()

Return Value

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

Remarks

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

.NET Framework Security

See Also

Reference

WorksheetBase Class

Microsoft.Office.Tools.Excel Namespace

Other Resources

Combining VBA and Document-Level Customizations

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