+ Reply to Thread
Results 1 to 16 of 16

creating a sparkline using VBA

Hybrid View

  1. #1
    Valued Forum Contributor
    Join Date
    10-21-2011
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    513

    Re: creating a sparkline using VBA

    Quote Originally Posted by OnErrorGoto0 View Post
    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
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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