Consulting

Results 1 to 2 of 2

Thread: Chart in Userform

  1. #1

    Thumbs up Chart in Userform

    Hi,

    i've just created a chart in an vba userform in excel (shown as a jpeg, saved locally in the background) with the type xlColumnStacked.
    there are two series, and four "columns".. so each column is stacked of two values.

    So what i want is to have the exact values captioned/labelled/written in each value on the chart.. is that possible??

    here is an extract of my chart-code:

    ....

    Dim MyChart As Chart
    Dim ChartName As String


    ChartName = "Open/Closed"


    Set MyChart = Sheets("datenfuerauswahlfelder").Shapes.AddChart(xlColumnStacked).Chart


    MyChart.SeriesCollection.Add _
    Source:=Worksheets("datenfuerauswahlfelder").Range("p4:s4")


    MyChart.SeriesCollection(1).Name = "Priority 2" 'werte von prio 2'

    MyChart.SeriesCollection(1).XValues = Sheets("datenfuerauswahlfelder").Range("P2:s2") 'x- achsenbeschriftung'

    MyChart.Refresh


    MyChart.SeriesCollection.NewSeries

    MyChart.SeriesCollection(2).Name = "Priority 1"
    MyChart.SeriesCollection(2).Values = Sheets("datenfuerauswahlfelder").Range("P3:S3") 'werte prio1'
    MyChart.Refresh
    ...



    thanks

  2. #2
    ok i've just found the ".HasLabels" - command (MyChart.SeriesCollection(1).haslabels=true & MyChart.SeriesCollection(2).haslabels=true)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •