Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 44
Default Need Help with Set Object = Collection(index)

Hi all,

A little insight would be greatly appreciated,

I have a collection of instances of a class (object = Market,
collection = Markets). When I received an .ondata event I "Set
Market = Markets(IndexNumber)" based upon the market which received
the .ondata event. I then process a series of subs and functions.

My question is this, while processing the series of subs and functions
what happens if I receive another .ondata event for a different market?
Will the "Set Market = Markets(IndexNumber)" happen while I'm in
the middle of processing the other market?
How would you all recommend preserving the state of "Set Market ="
while I'm in the midsts of processing. Or, is this even necessary.
I'm hoping that the current thread would have precedence over the
..ondata event.

Any insight you may have to share would be greatly appreciated.

Thanks,

Trip

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default Need Help with Set Object = Collection(index)

Hi Trip,

I imagine (??) that your .ondata event won't fire until your other code has
finished processing. Though I'm not certain, eg if you have DoEvents in your
code I guess it might.

Howabout, when you finish processing be sure to "Set Market = Nothing", and
before setting Market in your new event

If Not Market is Nothing then
'hmm still working with Market
' Stop ' & debug what's going on
Application,OnTime Now, "proc to go back & set the new market stuff"
Exit Sub
End If

Only a thought!

Regards,
Peter T



"Trip" wrote in message
oups.com...
Hi all,

A little insight would be greatly appreciated,

I have a collection of instances of a class (object = Market,
collection = Markets). When I received an .ondata event I "Set
Market = Markets(IndexNumber)" based upon the market which received
the .ondata event. I then process a series of subs and functions.

My question is this, while processing the series of subs and functions
what happens if I receive another .ondata event for a different market?
Will the "Set Market = Markets(IndexNumber)" happen while I'm in
the middle of processing the other market?
How would you all recommend preserving the state of "Set Market ="
while I'm in the midsts of processing. Or, is this even necessary.
I'm hoping that the current thread would have precedence over the
.ondata event.

Any insight you may have to share would be greatly appreciated.

Thanks,

Trip



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Collection Object, 255 item limitation timothy[_2_] Excel Programming 4 September 11th 05 09:43 PM
Problems returning Collection object McManCSU[_23_] Excel Programming 4 August 9th 05 07:02 PM
Collection Object Keys Todd Huttenstine Excel Programming 10 October 29th 04 01:14 PM
Function unable to return Collection object Adrian[_7_] Excel Programming 1 July 12th 04 06:22 PM
CombBox - Object of What Collection? George Excel Programming 7 February 10th 04 12:01 AM


All times are GMT +1. The time now is 10:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"