arraylist for combobox

elmnas

Board Regular
Joined
Feb 20, 2015
Messages
206
Hello people

I need an arraylist in a combo box that presents hours.

but I want to have the array list like 0.1=10 min

0.1 hours
0.2 hours

when it comes to 1.6 it returns to 2 and when it comes to 3.6 it returns 4 instead.

Could someone help me?


this is what I got so far..


Code:
  For i = 0.1 To 28        Me.Time.AddItem (i)
    Next i
 
Try this.
Code:
    For I = 0.1 To 28 Step 0.1
        Me.Time.AddItem Format(I, "0.0")
    Next I
 
Upvote 0
Try this.
Code:
    For I = 0.1 To 28 Step 0.1
        Me.Time.AddItem Format(I, "0.0")
    Next I

but its not really what I wanted..

2vug7l4.png


I want

0.1
0.2
0.3
0.4
0.5
1
1.1
1.2
1.3
1.4
1.5
2


etc

But thank so far in advance mate.
 
Upvote 0
Try this.
Code:
    For I = 0 To 27
        For j = 1 To 9
            Me.Time.AddItem I & "," & j
        Next j
        Me.Time.AddItem I + 1
    Next I
 
Upvote 0

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