Speed Sensitive Scroll Wheels

paradox715

New Member
Joined
Jan 14, 2008
Messages
13
Hello,

I'm trying to do something with a scroll wheel that is common on alarm clocks and other types of gadgets.

I want to have the scroll wheel increment 1 unit at a time when clicked. However, the longer the user holds down the button, the faster it will increment.

For example
.SmallChange = 1 'When a user clicks
.SmallChange = 2 'When the user clicks and holds for 3 seconds
.SmallChange = 5 ' When the user has been holding for 5 seconds
.SmallChange = 100 'Full speed, after holding for 10 seconds

I just don't know how to capture the length of time. In a perfect world, I don't want to write a lot of cases / IF/Thens - I was thinking there must be a more elegant way of incrementing based on a slope or curve.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,222,827
Messages
6,168,482
Members
452,192
Latest member
FengXue

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