Is what i want to do even possible?

m_in_spain

Board Regular
Joined
Sep 28, 2018
Messages
72
Office Version
  1. 365
Platform
  1. Windows
Hi, (again!) I am trying to start a countdown of numbers from X to zero and meanwhile carry on down the Sub continuing to do the process while my counter returns the count down mumber to my user form.
I can get the code to start the countdown, and return the number to my user form, but cannot seem to get the original code to carry on at the same time.
Here is a snippet of what works ok, and where it stops... is this even possible to do?
VBA Code:
      nextScheduledTime = Now
    Application.OnTime EarliestTime:=nextScheduledTime, Procedure:="Start_Countdown", Schedule:=True
                    If nochg = Range("numCHG") Then GoTo line990
                    UserForm1.Label32.Caption = ("CHARGE ") & (Zn - Zn + 2)
                        If n < t * 0.75 And f > 0 Then
So the procedure "Start Countdown" works fine, but i want to simulaneously continue on to the If nochg... bit
the countdown is a number that decreases by 1 until it hits zero, basically a clock countdown but using numbers instead of time firmat
Any guidance is much appreciated
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Hello m_in_Spain

I think this is doable , but you may need to go at in a different way. The Application.OnTime method you're using schedules a procedure to run at a specific time, but it doesn't produce a parallel process.

To get what you want, you'll need to use a timer that runs by it self of the main code.

hope this helps
plettieri
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,242
Members
452,623
Latest member
russelllowellpercy

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