Worksheet - Chart

EventDescription
ActivateEventOccurs when an embedded chart or chart object on a chart sheet is selected.
BeforeDoubleClick (VBA)Occurs before an embedded chart or chart object on a chart sheet is double clicked.
BeforeRightClick (VBA)Occurs before an embedded chart or chart object on a chart sheet is right clicked.
BindingContextChanged 
Calculate (VBA)Occurs before any new data is plotted or data changes.
This is raised on a chart sheet that was updated because data it referenced changed. This event does not occur until the chart is forced to redraw. So if the chart is not currently visible because it is not selected or displayed in its own window the event will not be raised until the chart is visible
Deactivate (VBA)Occurs when a new embedded chart or chart sheet is activate and another embedded chart, chart sheet or worksheet is selected.
MouseDown (VBA)Occurs when a mouse button is pressed while the pointer is over an embedded chart or chart sheet.
MouseMove (VBA)Occurs when the mouse pointer is moved over the chart
MouseUp (VBA)Occurs when a mouse button is released while the pointer is over an embedded chart or chart sheet
Resize (VBA)Occurs when a chart is resized
SelectEventOccurs when a chart element is selected
Raised when the selected element within a chart sheet changes. The combination of the three parameters allows you to determine exactly what element is selected.
SeriesChange (VBA)Occurs when a value of a chart data point changes.

Chart - Activate

Calculate is the name of both a method and an event.

((Excel.DocEvents_Event)gApplicationExcel.ActiveChart).Activate += 
    new Excel.ChartEvents_ActivateEventHandler(Event_ChartActivate);
public void Event_ChartActivate()
{
}

Addhandler CType(gApplicationExcel.ActiveChart Excel.ChartEvents_Events).Calculate 

Chart - Select

Select is the name of both a method and an event.

((Excel.DocEvents_Event)gApplicationExcel.ActiveChart).Select += 
    new Excel.ChartEvents_SelectEventHandler(Event_ChartSelect);
public void Event_ChartSelect()
{
}

Addhandler CType(gApplicationExcel.ActiveChart Excel.ChartEvents_Events).Select 


Creating Dynamically

You can create Charts dynamically
Chart controls can be positioned at arbitrary coordinates, all the other host controls must be positioned using a range.


Microsoft.Office.Tools.Excel.Chart AddChart( 
   double left,
   double top,
   double width,
   double height,
   string name);

Public Function AddChart( _ 
   ByVal left As Double, _
   ByVal top As Double, _
   ByVal width As Double, _
   ByVal height As Double, _
   ByVal named As String) _
   As Microsoft.Office.Tools.Excel.Chart

Microsoft.Office.Tools.Excel.Chart AddChart( 
   Microsoft.Office.Interop.Excel.Range range,
   string name);

Public Function AddChart( _ 
   ByVal range As Microsoft.Office.Interop.Excel.Range, _
   ByVal name As String) _
   As Microsoft.Office.Tools.Excel.Chart


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