• ** There has been a recent site upgrade. Please clear your browser cache to avoid issues. **
  • New forum feature - post voting and best solution

    Check out this thread for the details: https://www.access-programmers.co.uk/forums/threads/new-forum-feature-post-voting-and-best-answer.314134/

    This new feature looks great to me! :)

  • We now have 3 forum themes

    Go for the default (light) theme, Shades of Grey or Shades of Blue. I just added the Blue one.

    The thread about it is here: https://www.access-programmers.co.uk/forums/threads/new-forum-theme-shades-of-blue.314136/

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

SamuelDz

New member
Local time
Yesterday, 20:42
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: 14

isladogs

CID VIP
Local time
Today, 03:42
Joined
Jan 14, 2017
Messages
13,946
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
Yesterday, 20:42
Joined
Oct 7, 2019
Messages
3
Hi Sorry this is Access related.
 

arnelgp

error reading drive A:
Local time
Today, 11:42
Joined
May 7, 2009
Messages
10,577
objDataSheet.Range("01") ="my Label 1"
objDataSheet.Range("02") ="my Label 2"
 

Users who are viewing this thread

Top Bottom