Author |
Topic: Problem with API COM Excel (11 messages, Page 1 of 1) |
||||
---|---|---|---|---|---|
Moderators: VPfau | |||||
DMu72 Posts: 20 Joined: May 28, 2008 |
When I login Excel return err-message "Invalid property array index" because in
Public Sub PrepareContracts() cmbContracts.Clear Dim ContractList As OECAPICOM.ContractList Set ContractList = api.Contracts For i = 0 To ContractList.Count - 1 cmbContracts.AddItem ContractList.ItemByIndex(i).symbol Next cmbContracts.value = cmbContracts.List(0) End Sub on sheet "Abbreviated" ContractList.Count = 0 Why ContractList.Count = 0 ? My login TFaser62 |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
as we recently announced, latest version of OEC API does not download all available contracts on login.
You have to manually download contracts for symbols (BaseContracts) you are interested in, using OECClient.RequestContracts method, and you need to subscribe the OnContractsChanged event to know when contracts are downloaded. The Excel sample will be updated today for this change. |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
Thanks,
pls write here or to my mail mikleog6@gmail.com when update Excel-sample and how I can get new Excel-file |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
Please download and install latest "API COM Interface" from the My Account/API Documentation page of this web site.
|
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
Excel send err-messages:
1. "Application defined or object defined error" and after click "Ok" next err-message 2."Login Failed: InvalidUserOrPassword" What problem is? |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
Please make sure you are using valid username and password. You can check it using OEC Trader Dev.
|
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
FIRST err-messages:
1. "Application defined or object defined error" Why? |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
I input log\pass TFaser62\Demo11654 - it's valid, because it work in OECTrader
Repeat it many time. Why it log\pass not valid in API COM Excel? |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
This username and password are for demo environment. API developers are working with API environment, which has different username and password.
Regarding Application defined error - I do not quite see how did you get that. You could enable break on all errors mode in the excel debugger and check where in the source code it happens - this could give a clue. |
||||
DMu72 Posts: 20 Joined: May 28, 2008 |
If I right undetrstand Y,
my Api Devrlop login is DMu72. But I forgot password for it login. In mail-box(mikleog5@gmail.com) for DMu72 login not have message from OEC's server with passsword for the login. How I can remember password or inquire it? |
||||
SergeK -Developer- Posts: 475 Joined: Jan 26, 2007 |
since it doesn't seem to be related to API programming, I've forwarded your request to our general support - support@openecry.com.
|
||||