+ Reply to Thread
Results 1 to 1 of 1

Created Graph but can't edit the Axis

Hybrid View

  1. #1
    Registered User
    Join Date
    02-27-2013
    Location
    Florida
    MS-Off Ver
    Excel 2007
    Posts
    14

    Created Graph but can't edit the Axis

    Below is the code that I'm using to create a graph from an an array of data.
    The problem is that the x and y values are too small to make out. I would like to insert some lines into the existing code to make the graph come out more legible.
    Ideally I would like the fonts to be set to pt.15. And in the Axis Options,set the major and minor unit to 5, and set the "Minimum" to 50.
    I could not figure this out using the recorder or by looking at similar posts on the forum.

    Thank you in advance.
    Sub Create_Line_Chart1()
    'create a line chart in excel with this macro
    'ActiveSheet.Unprotect Password:="123"
    Dim charttitle As TextColumn2
    ProductName = Worksheets("Occupancy").Range("B2")
    ActiveSheet.Shapes.AddChart.Select
    ActiveChart.SetSourceData Source:=Range("'Monthly'!$C$2:$AA$4")
    ActiveChart.ChartType = xlLine
    ActiveChart.Parent.Width = 900
    ActiveChart.HasTitle = True
    ActiveChart.charttitle.Text = ProductName
    ActiveChart.charttitle.Select
    With Selection.Characters(Start:=1, Length:=26).Font
    .Name = "Arial"
    .FontStyle = "Regular"
    .Size = 20
    .Shadow = False
    .Underline = xlUnderlineStyleSingle
    .ColorIndex = 1
    End With
    'ActiveSheet.Protect Password:="123"
    End Sub
    Last edited by JosephP; 02-27-2013 at 07:01 PM. Reason: add code tags

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1