PureBytes Links
Trading Reference Links
|
Hi Ken,
Taking a guess here.
Might be this line
stock5 = ab.Stocks(Fn3);
Maybe should be
stock5 = ab.Stocks(Fn5);
regards,
Greg
--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <ken45140@xxx> wrote:
>
> The following code does not produce an error:
>
> ab = CreateObject("Broker.Application");
>
>
>
> Fn3 = ParamStr( "Fund3", "WTM24");
>
> Fn4 = ParamStr( "Fund4", "FDRXX");
>
> Fn5 = ParamStr( "Fund5", "WTM25");
>
> stock3 = ab.Stocks(Fn3);
>
> stock4 = ab.Stocks(Fn4);
>
> stock5 = ab.Stocks(Fn3);
>
> FName3 = stock3.FullName;
>
> FName4 = stock4.FullName;
>
> FName5 = stock5.FullName;
>
>
>
> The following produces an error in the last shown line:
>
>
>
> ab = CreateObject("Broker.Application");
>
>
>
> Fn3 = ParamStr( "Fund3", "WTM24");
>
> Fn4 = ParamStr( "Fund4", "FDRXX");
>
> Fn5 = ParamStr( "Fund5", "WTM25");
>
> stock3 = ab.Stocks(Fn3);
>
> stock4 = ab.Stocks(Fn4);
>
> stock5 = ab.Stocks(Fn5);
>
> FName3 = stock3.FullName;
>
> FName4 = stock4.FullName;
>
> FName5 = stock5.FullName; <<<< Line with error
>
>
>
> Error Msg = COM object variable is not initialized or has invalid type
> (valid COM object handle required)
>
>
>
> Look closely. The definition of stock5 changes subtley from the no error
> state to the error state.
>
>
>
> I used copy/paste for the statements, then changed the variables. I
cannot
> get rid of the error message. Fn5 always has contained a valid
statement
> and a valid fund in the default position of the ParamStr statement.
>
>
>
> Any ideas?
>
>
>
> Ken
>
Please note that this group is for discussion between users only.
To get 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/
|