Wrox Programmer Forums
|
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 24th, 2008, 12:08 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Default Progress bar and Timer

Hi,all,
I create a statusbar on which put a progress bar on the second panel and use a timer to change the value for proress bar, everything works fine.
BUT..
Because I need to work on spreadsheet from VB program, when I call spreadsheet micro (it will take several minutes), the timer will no longer be called and there is no value be updated for progress bar. Did any of you encounter this issue? is there a way to solve this problem?

Thanks!


 
Old October 24th, 2008, 12:22 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Hi there..

Because you are probably calling the spreadsheet synchronously, your program is waiting for it to call back, and none of the event thats occurs on your program are handled. Can you call it async?? what code are you using for the call???

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old October 24th, 2008, 12:46 PM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thank you for reply.

Inside my VB project function, I wrote:

Call LoadProgressBar
oExcel.run "EXCEL_Micro" 'this step takes time.
call unloadProgressBar

how to call it call it async? if I call it async, is it possible that the project will call other function that will use the results of the micro action before micro is executed?



 
Old October 24th, 2008, 12:59 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,189
Thanks: 5
Thanked 59 Times in 57 Posts
Send a message via MSN to gbianchi
Default

Ok, don't have a clu on how to call it async, maybe google could help???

if you call async, maybe, MAYBE, you have some events that tell you how it is doing...

HTH

Gonzalo

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from dparsons signature and he Took that from planoie's profile
================================================== =========
My programs achieved a new certification (can you say the same?):
WORKS ON MY MACHINE
http://www.codinghorror.com/blog/archives/000818.html
================================================== =========
I know that CVS was evil, and now i got the proof:
http://worsethanfailure.com/Articles...-Hate-You.aspx
================================================== =========
 
Old October 27th, 2008, 10:23 AM
Friend of Wrox
 
Join Date: Jan 2005
Posts: 108
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can anybody help me how to solve this issue? it looks bad when the progressbar is shown with no value changing.
it is said that timer use another progress, why it cannot be called when I call the long time loading micro of excel, I go to google, but I didn't find answer, maybe my keywords were not accurate.

Thanks.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Progress Bar dotnetsathya VS.NET 2002/2003 0 September 26th, 2007 12:33 AM
Progress Bar toekneel Crystal Reports 0 October 19th, 2004 11:04 AM
Progress Bar kevind23 Classic ASP Basics 1 May 24th, 2004 08:00 AM
Progress Bar Help jacob_d_99 Javascript How-To 1 November 20th, 2003 11:18 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.