title: Custom Chart point DataLabel Position
body: <p>I'm trying to set a DataLabel of a chart point in VBA, and cant find the way to do it.
  In the last part of this code I set up the properties of the chart's point, but I don't know how to set up a custom position, I attach a picture of the result I'm trying to have:</p>
  
  <pre><code>objCht.Chart.SetSourceData Source:=ResBook.Sheets(Right(NombreHoja, 2)).Range("P1:R" &amp; UltFilaGrafico)
  objCht.Activate
  Call AgregarEjeSecundario("Velocidad [km/h]", 3)
  
  ActiveChart.Axes(xlValue, xlSecondary).Select
  ActiveChart.Axes(xlValue, xlSecondary).MaximumScale = CInt(TargetVelocity) + 10
  ActiveChart.Axes(xlValue, xlSecondary).MinimumScale = 0
  ActiveChart.Legend.Position = xlLegendPositionBottom
  
  
  'ActiveChart.SeriesCollection(2).Points(50).MarkerStyle = xlDiamond
  With ActiveChart.SeriesCollection(1)
      '.Points(StopEventRow).MarkerStyle = xlDiamond
      .Points(StopEventRow).MarkerStyle = xlMarkerStyleTriangle
      '.Points(StopEventRow).MarkerSize = 10
      .Points(StopEventRow).MarkerBackgroundColor = RGB(255, 0, 0)    'Rojo
      .Points(StopEventRow).MarkerForegroundColor = RGB(1, 1, 1)
  
      .Points(StopEventRow).HasDataLabel = True
      .Points(StopEventRow).DataLabel.text = "Detención"
      '.Points(StopEventRow).ApplyDataLabels Type:=xlValue
      .Points(StopEventRow).DataLabel.Font.ColorIndex = 3
      '.Points(StopEventRow).DataLabel.Position = xlLabelPositionCustom
      '.Points(StopEventRow).ApplyDataLabels Type:=xlShowLabel
  
  End With
  
  </code></pre>
  
  <p>This is what I'm trying to accomplish through the VBA code.</p>
  
  <p>Here I manually set up the position of the label, I´m trying to get this done by the code</p>
  
  <p><a href="https://i.stack.imgur.com/JL0aw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JL0aw.png" alt="enter image description here"></a></p>