combobox nearest match

meridian2000

New member
Joined
Nov 18, 2014
Messages
4
Location
London/UK
Programming Experience
1-3
I have a combo box which is populated with numbers representing Minutes in steps of 10. i.e

00
10
20
30
40
50

when the form is loaded I get the time and put the current minute in to a variable. As an example the time now is 13:16 I'd like to make the combobox text show at 20 as 16 is the nearest match to 20. Is this possible?
 
Divide minute by 10, round to whole number (CInt or Math.Round), multiply by 10.
 
Back
Top