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
Bookmarks