Run Two Processes At Same Time

Jaye7

Well-known Member
Joined
Jul 7, 2010
Messages
1,069
OK, I am aware that you can not run 2 scripts at one time, my question is.

I downloaded an excel addin which is called TM digital clock, the addin is actually a userform which updates second by second and you can still do your other work and processes at the same time and it doesn't interfere with what you are doing.

I want to have my own addin running, i.e. a progress bar via a userform which is my own animated gif of a man running back and forth.

I know that you can use progress bars such as Andy pope's however these do not work if you have screen updating turned off which I want, yet the TM clock still runs perfectly.

Can anyone help with something that I can save my addin and it works independently of the work that I am doing.

Sorry if this is a bit confusing. :confused::confused::confused:
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Not knowing the specifics of your code I can only suggest a couple of things:

Use the DoEvents Statement
Use a Win32 Timer.
 
Upvote 0
Thanks Jaafar, I will look into the timers and get back to you if I need some help.
 
Upvote 0
I have used timer updates on the screen by briefly turning on and off the screen update feature to give snapshot of the most recent change. It tends to do a screen flicker if done a lot. Still would make your man running choppy perhaps.

One way I might approach it is to let your addin man run back and forth across the screen with the screen update left on. But do "all other" screen changes that would normally occur in the visible screen, somewhere outside of the current screen (perhaps in a different worksheet). Then when completed copy them back to the main screen when done. Then you would never have to turn off the screen updating during processing (except right before the final copy perhaps).

This of course would only work if the area updating outside of the main one is not using things like "copy" "paste" etc as that would move the screen there when called if you leave screen updating on.

But it will not move the screen there when copying in this manner:
Code:
Range("Y150").Value = Range("Z150").Value
Hope that might be of use.
 
Upvote 0
Jaafar,

I have made up a dummy workbook which is located at the following link,
basically I would like it to run both userforms at the same time, however the progress bar side of it can take up to five minutes to run, whereas I want the other form to update every couple of seconds or so...

I looked at the Win timers but they are too complicated for me.

If you could help I would really appreciate it.

When you open the workbook it will bug out as I have the forms activating upon open and it will not run both forms at the same time.

I couldn't put my actual file as it opens up specific files in my drives and does some work and closes them and also it is sensitive info.

http://jt7.angelfire.com/Testbook.xls
 
Upvote 0
Jaafar,

I have made up a dummy workbook which is located at the following link,
basically I would like it to run both userforms at the same time, however the progress bar side of it can take up to five minutes to run, whereas I want the other form to update every couple of seconds or so...

I looked at the Win timers but they are too complicated for me.

If you could help I would really appreciate it.

When you open the workbook it will bug out as I have the forms activating upon open and it will not run both forms at the same time.

I couldn't put my actual file as it opens up specific files in my drives and does some work and closes them and also it is sensitive info.

http://jt7.angelfire.com/Testbook.xls

Hi Jaye7.

The link is not wokking. I get the following message :
We couldn't find the page you requested. Please check the URL and try again.

Try Box.net which is very reliable but needs pre-registration
 
Upvote 0
Hi Jaafar,

Rather than click on the link, if you copy and paste it into your address bar it should works. Thanks
 
Upvote 0
Hi Jaafar,

Rather than click on the link, if you copy and paste it into your address bar it should works. Thanks

Ok I downloaded the workbook. I see some cell copying and pasting going on so I am a bit confused . I can try and post an example similar to yours but more generic that simultaneously updates the progressbar and TextBox each on a different userform and hopefully you can take it from there.

I am bit pushed for time at the moment so I'll look into this later.

Edit: why don't you put the progressbar in the same form ? that would be easier and better looking IMO.
 
Upvote 0
Hi Jaafar,

The copying and pasting are just rubbish scripts to give you a basic idea of how the progress bar works, there is actually a large amount of script between each progress update on my actual form that I use, but I couldn't provide it as it has sensitive data and also relies on a lot of different file locations between each percentage of the script update so I just made up a dummy script.

I can't have them both on one form as the progress form takes minutes to run each line of script and the other form with the textbox I want to update every second or so what details to person using it.

Both forms will contain different data from time to time so much better for me that they are independent, especially as I would update the textbox form more often. The textbox form isn't the actual form that I will be using only, again it is just to give you an idea of what I am after.
 
Upvote 0
Hi Jaafar,

Thanks for all your help, I found a great example on Chip Pearson's site which I have adapted to suite my needs, it is scary if there is an error though as it just shuts down excel, so if you haven't saved your work then you have lost it all.

http://www.cpearson.com/Excel/OnTime.aspx
 
Upvote 0

Forum statistics

Threads
1,224,505
Messages
6,179,152
Members
452,891
Latest member
JUSTOUTOFMYREACH

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top