다음을 통해 공유


Chart.Select Event (Excel)

Occurs when a chart element is selected.

Syntax

.Select(ElementID, Arg1, Arg2)

An expression that returns a Chart object.

Parameters

Name

Required/Optional

Data Type

Description

ElementID

필수

Long

The selected chart element. For more information about these arguments, see the BeforeDoubleClick event.

Arg1

필수

Long

The selected chart element. For more information about these arguments, see the BeforeDoubleClick event.

Arg2

필수

Long

The selected chart element. For more information about these arguments, see the BeforeDoubleClick event.

Example

This example displays a message box if the user selects the chart title.

Private Sub Chart_Select(ByVal ElementID As Long, _ 
 ByVal Arg1 As Long, ByVal Arg2 As Long) 
 If ElementId = xlChartTitle Then 
 MsgBox "please don't change the chart title" 
 End If 
End Sub

참고 항목

개념

Chart Object Members

Chart Object