Hello!! I have done a small VBA program with a small bug .
I think that I have this bug because I don't know how to install and use the file
on my computer ...
So my question is very sample how to install the file Broker4705.tlb ?
Here is my VBA code wich is meeting a bug with the method "refreshall"
The kind of .xls that I use is on http://www.euronext.com otherwise a file is joined .
I think that I have this bug because I don't know how to install and use the file
Broker4705.tlb
So my question is very sample how to install the file Broker4705.tlb ?
Here is my VBA code wich is meeting a bug with the method "refreshall"
Code:
Sub test()
Dim derlign As Integer
derlign = Worksheets(1).Range("A65536").End(xlUp).Row + 1
Dim Amibroker As Object
Set Amibroker = CreateObject("Broker.application")
Dim i As Integer
Dim a, b, c As String
Dim collectiondestock As Object
For i = 1 To derlign
a = Val(Left(Cells(i, 6).Value, 1))
'a = Left(a, 1)
b = Cells(i, 5).Value & ".PA"
c = Cells(i, 1).Value
If a <> 0 Then
Set collectiondestock = Amibroker.stocks.Add(b)
collectiondestock.FullName = c
collectiondestock.IndustryID = a
End If
Next i
Set collectiondestock = Amibroker.RefreshAll() 'did not work ?!
Set Amibroker = Nothing
End Sub