
Originally Posted by
OnErrorGoto0
What is WSL? I assumed it was the codename of your worksheet.
Oops, I think it's supposed to be the name of the worksheet.
Anyhow, I'm getting a different error now
"object variable or With block variable not set.
Any ideas?
Private Sub SparklineTest_Click()
Dim LINE As SparklineGroup
Dim ws As Worksheet
Dim lastrow As Integer
lastrow = Cells(Rows.Count, 1).End(xlUp).Row
Set LINE = ws.Range("F2:G2").SparklineGroups.Add(Type:=xlSparkLine, SourceData:="Sheet1!A2:A" & lastrow)
End Sub
Bookmarks