Results 1 to 1 of 1

What does this piece of code do?

Threaded View

hawkinsr86 What does this piece of code... 02-20-2013, 11:50 AM
  1. #1
    Registered User
    Join Date
    08-10-2012
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    35

    What does this piece of code do?

    Hi guys,

    I am relatively new to vba and was just wondering if someone could explain what each line of this code does as i am trying to create an animated chart.

    Public Sub AnimateChart()
    
        Dim i As Integer
    
        bFinished = False
        ThisWorkbook.Names.Add "old", [chart_values]
        ThisWorkbook.Names.Add "switch_to_record", [record_index].Value
        If [b_animation] Then
            For i = 1 To [animation_steps]
                [step] = i
                DoEvents
                If bFinished Then Exit For
            Next i
        End If
        bFinished = True
    
    End Sub
    Thanks in advance!
    Last edited by JBeaucaire; 02-20-2013 at 05:08 PM. Reason: Added code tags, as per forum rules. Don't forget!

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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