This is my first post and I am really new to programming.
I am currently stuck on a line of code which is halting when the Graph is building. Basically I have a Database / Access and I have a function where I click the button and it opens a file from a specific location. It then Opens Excel and starts to run my code and then halts.
Below is a snippet, It gets stuck on the below line
ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = "M³ Per Month"
Range("A2:M6").Select
ActiveSheet.Shapes.AddChart.Select
ActiveChart.ChartType = xlLine
ActiveChart.SetSourceData Source:=Range("LCLSPENDGRAPH!$A$2:$M$6")
ActiveChart.SetElement (msoElementDataTableShow)
ActiveChart.SetElement (msoElementPrimaryValueAxisTitleRotated)
ActiveChart.Axes(xlValue, xlPrimary).AxisTitle.Text = "M³ Per Month"
Selection.Format.TextFrame2.TextRange.Characters.Text = "M³ Per Month"
With Selection.Format.TextFrame2.TextRange.Characters(1, 11).ParagraphFormat
.TextDirection = msoTextDirectionLeftToRight
.Alignment = msoAlignCenter
End With
With Selection.Format.TextFrame2.TextRange.Characters(1, 11).Font
.BaselineOffset = 0
.Bold = msoTrue
.NameComplexScript = "+mn-cs"
.NameFarEast = "+mn-ea"
.Fill.Visible = msoTrue
.Fill.ForeColor.RGB = RGB(0, 0, 0)
.Fill.Transparency = 0
.Fill.Solid
.Size = 10
.Italic = msoFalse
.Kerning = 12
.Name = "+mn-lt"
.UnderlineStyle = msoNoUnderline
.Strike = msoNoStrike
`
Any suggestions would be appreciated.
Kind regards JDogg