Serving the Quantitative Finance Community

 
User avatar
freddiemac
Topic Author
Posts: 7
Joined: July 17th, 2006, 8:29 am

ActiveX BB/Excel/VBA hangup

October 3rd, 2006, 2:28 pm

Hi! I guess I have been bothering this forum enough but I have have a problem with a macro that I have that I use for downloading ratings for a long list of ISIN codes. I use ActiveX synchrnous request by field. The problem is that my macro often hangs after a while. After it has been hanging for some time I press Esc and then check where in my code the program has stopped. But then I can continue walking through my code using "F8" so there is nothing really wrong. Does anyone have any general ideas how to handle the fact that the code hangs? Any help very much appreciated! Thanks alot in advance!
 
sjoo
Posts: 0
Joined: March 24th, 2003, 1:54 am

ActiveX BB/Excel/VBA hangup

October 4th, 2006, 1:25 am

VBA macro often hangs becuase of too much loop and shortage of Windows's resource(many windows opended) etc.When hanging, Excel seems to be dead. But it keeps running on.So I always use GetQueueStatus API function with VBA's DoEvents for preventing haning.Best regards,Sjoo
 
User avatar
spursfan
Posts: 2
Joined: October 7th, 2001, 3:43 pm

ActiveX BB/Excel/VBA hangup

October 4th, 2006, 4:05 pm

here's some info about getting the non responding messagehttp://blogs.msdn.com/excel/archive/2006/06/30/642465.aspx
 
User avatar
freddiemac
Topic Author
Posts: 7
Joined: July 17th, 2006, 8:29 am

ActiveX BB/Excel/VBA hangup

October 5th, 2006, 6:05 am

Thanks spursfan! I did not know this. However I have already added a progress bar as the blog suggests but my problem is not that the code just appears to be not running but that it actually hangs somewhere. Hi sjoo! Thanks for your DoEvents comment. I have looked around for DoEvents and found that there are quite mixed feelings about using that. It sound interesting though. Again my code actually hangs, or it takes something like 30 minutes to do quite simple task that should take 10 sec. Can DoEvents solve that? Perhaps you can give me a longer example of how you use the DoEvents...? I did not really understand how and why you use it in your previous message. Thank you both very much for your comments!
 
User avatar
saini
Posts: 0
Joined: November 23rd, 2006, 11:20 am

ActiveX BB/Excel/VBA hangup

November 24th, 2006, 3:42 am

hi all, can any body provide me an e-book on VBA for excel.my mail id is saini@eruditee.comregardssaini