Copy Paste Using Timer for Graph Visualizations

We can copy paste using timer for graph visualizations and data visualizations. Let’s take an example of a line graph defined by the equation: y =mx +c where x and y define the two points of the line, m defines the slope (how steep the line is) and c defines the y intercept i. e. ¬†where the line crosses the y-axis. By making changes in the m value with time we can visualize how the straight-line graph step by step.

Watch the training video below and then look at the detailed VBA code:

This learning video is also available on YouTube.

Public nextRow, Lrow

Sub copypasteUsingTimer()
Dim LastRow
LastRow = Range(“A” & Rows.Count).End(xlUp).Row
Lrow = LastRow
Range(“A” & nextRow + 1).Copy Destination:=Range(“b2”)
myTimer
End Sub

Sub myTimer()
If nextRow + 1 = Lrow Then
nextRow = 1
Exit Sub
Else

nextRow = nextRow + 1

Application.OnTime Now + TimeValue(“00:00:02”), “copypasteUsingTimer”

End If
End Sub

Further reference:

Find Last Row

Using Timer

 

Published by

Dinesh Kumar Takyar

Welcome to exceltrainingvideos.com! My aim is to help you learn MS Excel including VBA. I always felt that a good way to learn something was to find solutions to problems in that domain. That is why I share these Excel videos with you. Mostly these are questions asked during my corporate training sessions. I've been training individuals and companies in computers since 1991. I did my B. Sc. (Vordiplom), M. Sc. (Diplom) and Ph.D. (Dr. rer. nat.) from Hamburg, Germany. The best thing about solving some of my visitor's questions is that I also gain new insights. For more Excel VBA solutions you may like to visit my YouTube channel: http://youtube.com/familycomputerclub For a structured Excel VBA training course online you can visit: https://www.youtube.com/excelvbaonline

Leave a Reply

Your email address will not be published. Required fields are marked *