13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.130 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 0 1 100001 0 1 0 1 1 0 1 0 00 0 1 1 1 0 1 100001 0 1 1 100001 13:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.1313:05 ET Dow -154.48 at 10309.92, Nasdaq -37.61 at 2138.44, S&P -19.13

.

.

Saturday, June 18, 2011

Visual Basic for Applications - Event Driven Programming - Trading, Excel Based Trading, Real-Time Data, Dynamically-Linked Library, DLL

Option Explicit
Public indx As Integer


Sub StartPriceTkr()

''Sheet1.Range("a1").Value = Sheet1.Range("a1").Value + 1

If IsNumeric(indx) Then
   indx = indx + 1
   Sheet1.Cells(indx, 3).Value = Sheet1.Range("c1").Value
   Sheet1.Cells(3, 7).Value = indx
Else
   indx = 1
   Sheet1.Cells(indx, 3).Value = Sheet1.Range("c1").Value
   Sheet1.Cells(indx, 3).Value
   Sheet1.Cells(3, 7).Value = indx
End If
End Sub


Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$C$1" Then
Call StartPriceTkr
Sheet1.Cells(4, 7).Value = Worksheet_Change_ran
End If
End Sub

Sub ResetPriceTkr()
indx = 0
Sheet1.Cells(3, 7).Value = "Reset"
Call ClearPriceTkr
End Sub

Sub ClearPriceTkr()
Dim Counter As Integer
Dim curCell As Range
   For Counter = 2 To 5000
       Set curCell = Worksheets("Sheet1").Cells(Counter, 3)
       curCell.Value = ""
   Next Counter

End Sub