Mousehunter
New Member
- Joined
- May 6, 2008
- Messages
- 25
- Office Version
- 2013
- 2010
- Platform
- Windows
Well I 'll be damned...
I am trying to use Application.Wait function in order to alter the contents of a cell automatically using a preset period of time using a variable called BPM. For instance if I have 60 Beats Per Minute (BPM hereafter) then I want the cell to change every second because I want 60BPM per 60sec. If I have 30BMP I want it changed every second second and if I have 120BPM every half second. The formula to calculate the beats per second is 60/BPM.
It seems to be acting bizzare... While it is fairly accurate for BPM up to 60 (implied period of time between consecutive changes more than or equal to a second), it seems to be stuck to 1 second beating only 60 times per minute after 61BPM and up to 119BPM while it should be beating equal times per minute and seems to go crazy if I dare setting BPM at 120 or more (implied period of time between consecutive changes less that half a second)
Summary of Behaviour
Below is the code I use
Here is the behaviour for 60BPM
View attachment 44120
Below is the behaviour for 119 BPM
View attachment 44121
And finally, below is the behaviour from 120 and over
View attachment 44123
I am trying to use Application.Wait function in order to alter the contents of a cell automatically using a preset period of time using a variable called BPM. For instance if I have 60 Beats Per Minute (BPM hereafter) then I want the cell to change every second because I want 60BPM per 60sec. If I have 30BMP I want it changed every second second and if I have 120BPM every half second. The formula to calculate the beats per second is 60/BPM.
It seems to be acting bizzare... While it is fairly accurate for BPM up to 60 (implied period of time between consecutive changes more than or equal to a second), it seems to be stuck to 1 second beating only 60 times per minute after 61BPM and up to 119BPM while it should be beating equal times per minute and seems to go crazy if I dare setting BPM at 120 or more (implied period of time between consecutive changes less that half a second)
Summary of Behaviour
BPM | Expected BPM | Actual BPM | Comment |
---|---|---|---|
<=60 | <=60 | <=60 | Accurate |
<=119 | <=120 | 60 | Stuck to 60BPM |
>=119 | >=119 | >10.000 | Goes crazy... |
Below is the code I use
VBA Code:
|
Here is the behaviour for 60BPM
View attachment 44120
Below is the behaviour for 119 BPM
View attachment 44121
And finally, below is the behaviour from 120 and over
View attachment 44123