Use VBA to change series legend labels in Datasheet

SamuelDz

New member
Local time
Today, 12:20
Joined
Oct 7, 2019
Messages
3
Helllo all,

Im trying to modify the series labels of a chart (in the datasheet) in access using VBA, I have successfully used it to modify the data in the range but i now want to change the labels.

Is this possible?
below is the code im using to modify the data.

Private Sub Command318_Click()
Dim Graph_Data As Object
Dim objDataSheet As Object

Set Graph_Data = Me!UnboundChart.Object
Set objDataSheet = Graph_Data.Application.DataSheet

objDataSheet.Range("A1").Value = 9


Image below shows what I want change with vba
 

Attachments

  • 111.JPG
    111.JPG
    36.8 KB · Views: 178
Hi
For info, I moved this to the Excel forum.
Someone will I'm sure be along soon to assist
 
Hi Sorry this is Access related.
 
objDataSheet.Range("01") ="my Label 1"
objDataSheet.Range("02") ="my Label 2"
 

Users who are viewing this thread

Back
Top Bottom