Re: VBA help (again)
Hello Grantx.
Look for something like Dim BidSize or Dim AskSize. Under this copy and paste into your code
Dim Counterbid As Double
Dim CounterAsk As Double
Under the main block of code shown above copy and paste into your code
Counterbid = BidSize
CounterAsk = AskSize
For i = 2 To 10
If (.LimitVol(i, osBuy, 0, Data) <> NullValue) Then
Counterbid = Counterbid + .LimitVol(i, osBuy, 0, Data)
End If
If (.LimitVol(i, osSell, 0, Data) <> NullValue) Then
CounterAsk = CounterAsk + .LimitVol(i, osSell, 0, Data)
End If
Next i
ExcelDoc.Sheets(1).Cells(2, 19).Value = Counterbid
ExcelDoc.Sheets(1).Cells(2, 22).Value = CounterAsk
I hope this helps you.
Mikel. |