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

[amibroker] Extremely Sharp Eye Required to Find Error



PureBytes Links

Trading Reference Links

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___