Results 1 to 5 of 5

Animated Chart....copied from web, modifiying it slightly, and I could use a bit of advice

Threaded View

  1. #1
    Registered User
    Join Date
    11-07-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Thumbs up Animated Chart....copied from web, modifiying it slightly, and I could use a bit of advice

    Hello,
    This workbook, with VBA was found on the web (it could even be from here, for all I know). I can't locate the link. Anyway, What it does it load one column with False on each row, all the way down...and the VBA code then turns one row at a time into True. The rest of the workbook can then have it's data, based on if that row is True of not. If it's true then it plots the data, and if not then it gives an NA(). This way, a chart of the data, will show it adding data, one point at a time, each time the button is pushed.

    However, what I need it to change more than one row to True, per click of the button. Right now its too slow. I know that in the code "x" is the row, and it increases by x+1, to get to the next row, but that's about all I know. (VBA is fairly new to me, but I have a little programming experience). Could you please help me to slightly alter this, so that more rows are turned to True, with each click of the button? (or some other means). I will learn so much just by seeing what it is that you changed. Thank you very much for taking a moment !

    animatedchart.xlsm

    .....and here is a copy of the VBA :

    Sub changeVal()
    
        'set up parameters
        With ThisWorkbook.Worksheets(1)
        
            lastR = .UsedRange.Rows.Count
            x = 1
            Do
                x = x + 1
            
            Loop Until .Cells(x, 3) = False Or x > lastR
            
            If x <= lastR Then
                .Cells(x, 3) = True
            End If
                
        
        End With
    End Sub
    Sub changeValAuto()
    
        'set up parameters
        
        With ThisWorkbook.Worksheets(1)
            wt = .Cells(1, "N")
            lastR = .UsedRange.Rows.Count
            x = 2
            Do
                
                .Cells(x, 3) = True
                Application.Calculate
                
                setAt = Now
                waitTill = DateAdd("s", wt, setAt)
                Do
                
                Loop Until waitTill < Now
                x = x + 1
            
            Loop Until .Cells(x, 1) = ""
            
                
        
        End With
    End Sub
    
    Sub SetToFalse()
    
        'set up parameters
        With ThisWorkbook.Worksheets(1)
        
            lastR = .UsedRange.Rows.Count
            x = 2
            Do
                .Cells(x, 3) = False
                x = x + 1
                
                
            
            Loop Until .Cells(x, 1) = ""
            
                
        
        End With
    End Sub
    Last edited by auspicium; 11-08-2013 at 03:25 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Animated line chart
    By Dudgeon in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-04-2013, 01:28 PM
  2. Animated images on a chart
    By j_Southern in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 01-27-2012, 10:44 AM
  3. Animated images on a chart
    By j_Southern in forum Excel General
    Replies: 0
    Last Post: 01-27-2012, 10:44 AM
  4. Animated XY Chart?
    By Cam in forum Excel Charting & Pivots
    Replies: 4
    Last Post: 07-06-2011, 05:48 AM
  5. Animated Excel chart.....
    By Cam in forum Excel General
    Replies: 8
    Last Post: 03-29-2011, 02:45 PM

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