Team,
I'm really stuck on this one. CallByName() might be the right solution. But I'm unfamiliar with that solution. Any insight would be greatly appreciated.
Here goes... I have a live feed from my broker that has to be associated with an object. In this case, it's in a Class module called cMBT and defined as:
moComMgr, moOrders and moQuotes handle events such as logon and routing the inbound datastream.
In a regular Module I define requests such as logging-in. (I could put this in another object such as a userform.) There I have the following code:
The problem is that moComMgr, moOrders and moQuotes are not even recognized in the regular module.
Any insight would be greatly appreciated.
The more I think I know, the more I realize that I don't know...
Thanks,
John,
In Annapolis, MD
I'm really stuck on this one. CallByName() might be the right solution. But I'm unfamiliar with that solution. Any insight would be greatly appreciated.
Here goes... I have a live feed from my broker that has to be associated with an object. In this case, it's in a Class module called cMBT and defined as:
Code:
Option Explicit
Option Compare Text
[COLOR=Navy]Public WithEvents[/COLOR] moComMgr [COLOR=Navy]As[/COLOR] MbtComMgr
[COLOR=Navy]Public WithEvents[/COLOR] moOrders [COLOR=Navy]As[/COLOR] MbtOrderClient
[COLOR=Navy]Public WithEvents[/COLOR] moQuotes [COLOR=Navy]As[/COLOR] MbtQuotes
[COLOR=Navy]Public Sub[/COLOR] moOrders_OnLogonSucceed()
.
.
End sub
moComMgr, moOrders and moQuotes handle events such as logon and routing the inbound datastream.
In a regular Module I define requests such as logging-in. (I could put this in another object such as a userform.) There I have the following code:
Code:
[COLOR=Navy]Public Sub[/COLOR] LoginMBT(sUserName [COLOR=Navy]As[/COLOR] String, sPassWord [COLOR=Navy]As[/COLOR] String)
'-- Establishes Feed Elements -----
[COLOR=Black] [COLOR=Navy]Set[/COLOR] [/COLOR][COLOR=Black]moComMgr = [COLOR=Navy]New[/COLOR] MbtComMgr
[COLOR=Navy]Set[/COLOR] [/COLOR][COLOR=Black]moOrders = moComMgr.OrderClient
[COLOR=Navy]Set[/COLOR] [/COLOR][COLOR=Black]moQuotes = moComMgr.Quotes[/COLOR]
'-- DoLogin returns the state of the connection -----
'-- This logs into the account ----------------
mbGotLogin = [COLOR=Black]moComMgr[/COLOR].DoLogin(sUserName, sPassWord)
.
.
End Code
Any insight would be greatly appreciated.
The more I think I know, the more I realize that I don't know...
Thanks,
John,
In Annapolis, MD