Results 1 to 2 of 2

Thread: Label x Axis and y Axis with VBA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    VBAX Expert Dave's Avatar
    Joined
    Mar 2005
    Posts
    836
    Location
    Not sure about Access VBA but this does it for XL VBA. HTH. Dave

    With ActiveChart
       'chart name
       .HasTitle = True
       .ChartTitle.Characters.Text = "Chart Name"
       'X axis name
       .Axes(xlCategory, xlPrimary).HasTitle = True
       .Axes(xlCategory, xlPrimary).AxisTitle.Characters.Text = "X-Axis"
       'y-axis name
       .Axes(xlValue, xlPrimary).HasTitle = True
       .Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Y-Axis"
    End With
    Last edited by Aussiebear; 04-11-2023 at 03:51 PM. Reason: Adjusted the code tags

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •