Results 1 to 16 of 16

creating a sparkline using VBA

Threaded View

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

    creating a sparkline using VBA

    Hi there,

    I'm trying to create a sparkline using VBA(just testing it out for fun)

    
    Private Sub SparklineTest_Click()
    Dim LINE As SparklineGroup
    
    Dim lastrow As Integer
    lastrow = Cells(Rows.Count, 1).End(xlUp).Row
    
    set LINE = WSL.range("F2:G2").SparklineGroups.add(Type:xlsparkline, sounrcedata:="Sheet1"!A2" & lastrow
    
    
    End Sub
    I keep getting stuck at the word "Type" in the codeline. Error is on "Expression"

    Has anybody had any experience using sparkline in VBA? The code comes from some website, but I have tried to modify it to suit my needs.

    Any ideas?
    Attached Files Attached Files
    Last edited by Lifeseeker; 02-06-2012 at 09:44 AM.

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