AppEvents_Event.WorkbookNewChart Event
Occurs when a new chart is created in any open workbook.
Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)
Syntax
'Declaration
Event WorkbookNewChart As AppEvents_WorkbookNewChartEventHandler
'Usage
Dim instance As AppEvents_Event
Dim handler As AppEvents_WorkbookNewChartEventHandler
AddHandler instance.WorkbookNewChart, handler
event AppEvents_WorkbookNewChartEventHandler WorkbookNewChart
Remarks
The WorkbookNewChart event occurs when a new chart is inserted or pasted in a worksheet, a chart sheet, or other sheet types. If multiple charts are inserted or pasted, the event will occur for each chart in the order they are inserted or pasted. If a chart object or chart sheet is moved from one location to another, the event will not occur. However, if the chart is moved between a chart object and a chart sheet, the event will occur because a new chart must be created.
The WorkbookNewChart event will not occur in the following scenarios: copying or pasting a chart sheet, changing a chart type, changing a chart data source, undoing or redoing inserting or pasting a chart, and loading a workbook that contains a chart.