Simulation: a race car

yxz152830

Active Member
Joined
Oct 6, 2021
Messages
393
Office Version
  1. 365
Platform
  1. Windows
Gurus,
I want to make a race car simulation. Could anyone give me some tips on what vba function to use?
Suppose this is a 10 sec simulation on a straight track.
1. Does VBA have a timer function?
2. How do I simulate the movement of the car corresponding with the timer? I'm thinking that a filled cell that goes blank and the format gets passed down to the adjacent cell might do it. But im not sure how to link it to a timer.

Thank you so much and happy new year!
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Sth like this
PHP:
dim tcar1 is double, tcar2 is double, t1 as double, t2 as double
tcar1=timer ' car1 time run
tcar2=timer ' car2 time run
car1 code run 'code for car 1
car2 code run' code for car2
...
t1 = timer - tcar1' car1 time
t2 = timer - tcar2' car2 time
 
Upvote 0

Forum statistics

Threads
1,215,009
Messages
6,122,674
Members
449,091
Latest member
peppernaut

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