[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: How to install the file Broker4705.tlb ?



PureBytes Links

Trading Reference Links

--- In amibroker@xxxxxxxxxxxxxxx, "aajurg" <aajurg@xxx> wrote:
>
> yes that's exactly my problem I don't know if I must use a early
> binding or a late binding with my VBA code .
> 
> It seems taht this line 
> 
> Dim Amibroker as broker.application  'It is a early binding but It
> don't walk on my computer ?
> 
> Dim Amibroker as Object ' It is a late binding , it's better but I
> meet a bug with the method ".refreshall" 

You didn't mention your error message but your problem is probably
because RefreshAll is a Sub so you cannot assign the return value to
collectiondestock.  Get rid of the "Set collectiondestock = " and just
use:

Amibroker.RefreshAll()


That should help,

Tuzo
 
> Sub test()
> 
> Dim derlign As Integer
> derlign = Worksheets(1).Range("A65536").End(xlUp).Row + 1
> 
> Dim Amibroker As Object
> 'Dim Amibroker As Broker.application 'is not accepted
> ' I thougth that by using the file Broker4705.tlb then this VBA line
> will be accepted ...For the instant I don't understand this file and
> my computer is not a server .
> 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)) 'sector's number
> 'a = Left(a, 1)  'keep only the first number
> b = Cells(i, 5).Value & ".PA" 'catch the ticker
> c = Cells(i, 1).Value 'catch the complete name
> 
> 
> 
> If a <> 0 Then  
> Set collectiondestock = Amibroker.stocks.Add(b)
> collectiondestock.FullName = c
> collectiondestock.IndustryID = a
> End If
> 
> Next i
> 
>    Set collectiondestock = Amibroker.RefreshAll()   'BUG ...
>    ' It is not the good variable's size 
>    Set Amibroker = Nothing
> 
> End Sub
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL SUPPORT from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com
*********************

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html

*********************************
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/