Hallo,
weiss nicht, was ich hier falsch mache.
Möchte ein Diagramm auf eine Form zeichnen lassen.
Projektverweise:
Microsoft Graph 11.0 Object Library
Microsoft Excel 11.0 Object Library
MSGraphCtl Type Library
ExcelCtl Type Library
Komponenten: (Einfügbare Objekte)
Microsoft Excel Diagramm
Microsoft Graph Diagramm
Fehlt noch ein Verweis/Komponente ??
Weshalb LFZ 91. Das Objekt oWks ist doch vorhanden.
Vielen Dank
Edit by Agent: VB-Tag eingefügt
weiss nicht, was ich hier falsch mache.
Möchte ein Diagramm auf eine Form zeichnen lassen.
Projektverweise:
Microsoft Graph 11.0 Object Library
Microsoft Excel 11.0 Object Library
MSGraphCtl Type Library
ExcelCtl Type Library
Komponenten: (Einfügbare Objekte)
Microsoft Excel Diagramm
Microsoft Graph Diagramm
Visual Basic-Quellcode
- Private Sub Command1_Click()
- Dim oChart As Chart
- Dim oWks As Worksheet
- Dim arrX, arrY
- Dim i As Long
- 'Daten
- arrx = Array(2000, 2001, 2002, 2003, 2004)
- arry = Array(10, 11, 9, 12, 11)
- Set oWks = ActiveSheet
- For i = 0 To 4 'Worksheet füllen
- 'oWks.Cells(i+1,1) löst LZF 91 aus
- oWks.Cells(i + 1, 1) = arrx(i)
- oWks.Cells(i + 1, 2) = arry(i)
- Next i
- 'Diagramm hinzufügen
- Set oChart = Charts.Add
- With oChart
- .ChartType = xlXYScatter
- .SetSourceData oWks.Range("A1:B5"), xlColumns
- .Location xlLocationAsObject, oWks.Name
- End With
- Set oChart = Nothing 'Speicher freigeben
- End Sub
Fehlt noch ein Verweis/Komponente ??
Weshalb LFZ 91. Das Objekt oWks ist doch vorhanden.
Vielen Dank
Edit by Agent: VB-Tag eingefügt
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Agent“ ()