It appears to be working.
When you said initially, the range doesn't make sense, which part of the code were your referring to?![]()
Private Sub SparklineTest_Click() Dim LINE As SparklineGroup Dim ws As Worksheet Set ws = Sheets("Sheet1") Dim lastrow As Integer lastrow = Cells(Rows.Count, 1).End(xlUp).Row Set LINE = ws.Range("F2").SparklineGroups.Add(Type:=xlSparkLine, SourceData:="Sheet1!A2:A" & lastrow) End Sub
Bookmarks