Use VBA to change series legend labels in Datasheet (1 Viewer)

SamuelDz

New member
Local time
Today, 14:35
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: 114

isladogs

MVP / VIP
Local time
Today, 21:35
Joined
Jan 14, 2017
Messages
18,186
Hi
For info, I moved this to the Excel forum.
Someone will I'm sure be along soon to assist
 

SamuelDz

New member
Local time
Today, 14:35
Joined
Oct 7, 2019
Messages
3
Hi Sorry this is Access related.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:35
Joined
May 7, 2009
Messages
19,169
objDataSheet.Range("01") ="my Label 1"
objDataSheet.Range("02") ="my Label 2"
 

Users who are viewing this thread

Top Bottom