by alrodopial » Mon Jul 08, 2013 10:21 am 
			
			Hi,
I'm trying to copy the info that marketdeph has into a variant and use this info later in a macro
My code in sheet1:
Dim WithEvents ba As BettingAssistantCom.ComClass
Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Columns.Count = 16 Then
         If ba Is Nothing Then
            Set ba = New BettingAssistantCom.ComClass
            ba.tabIndex = 0
         End If
         ba.getMarketDepth False
    End If
End Sub
Private Sub ba_getMarketDepthComplete(ByVal MarketDepth As Variant, ByVal resultCode As String)
    MarketDepthVariant = MarketDepth
End Sub
and in a module
Public MarketDepthVariant As Variant
Sub MyMACRO()
     If MarketDepthVariant Is Empty Then Exit Sub
     .......................
End Sub
I get error at "If MarketDepthVariant Is Empty" saying that object is required. Marketdepth is not created at all or I just can't copy it?
The ba_getMarketDepthComplete is running because in break mode i can see the resultcode is "ok" but when the mouse is over "marketdepth" i don't see anything
Any ideas?