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

SamuelDz

New member
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

isladogs

CID Moderator
Staff member
Joined
Jan 14, 2017
Messages
12,329
Hi
For info, I moved this to the Excel forum.
Someone will I'm sure be along soon to assist
 

SamuelDz

New member
Joined
Oct 7, 2019
Messages
3
Hi Sorry this is Access related.
 

arnelgp

error reading drive A:
Joined
May 7, 2009
Messages
8,626
objDataSheet.Range("01") ="my Label 1"
objDataSheet.Range("02") ="my Label 2"
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top Bottom