docs:programming:office_vba:charts

Charts

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
 
    ' update the chart title
    Dim currAvg As Integer
    currAvg = Application.WorksheetFunction.Floor(Worksheets("Data").Range("G21").Value, 1)
 
    With Chart1
        .HasTitle = True
 
        ' vbNewLine is a line break, appropriate for the current platform
        .ChartTitle.Text = "Tri-City Bowl - Pinbreakers League" _
            & vbNewLine _
            & "Bill Hartung" _
            & vbNewLine _
            & "Average: " _
            & currAvg
    End With
 
End Sub
  • docs/programming/office_vba/charts.txt
  • Last modified: 2008/08/03 00:25
  • by 127.0.0.1