|
-
Apr 3rd, 2000, 03:41 PM
#1
Thread Starter
New Member
I want to have a list box which lists numbers from 0 to 10 with one decimal place. Is it possible to get this in a list box without typing them all in?
-
Apr 3rd, 2000, 03:52 PM
#2
Hyperactive Member
for i = 1 to 10
list1.additem format(i,"99.9")
next i
Try this
[email protected]
Co Galway
Ireland
-
Apr 3rd, 2000, 07:43 PM
#3
Lively Member
This code will fill the listbox with the values 0.0, 0.1, 0.2, 0.3, ... , 9.8, 9.9, 10.0
If this is what your loking for. If you only want integers then the code from john_murphy will work.
Code:
Dim dblNum As Double
List1.Clear
dblNum = 0
Do While dblNum <= 10
List1.AddItem Format(dblNum, "#0.0")
dblNum = dblNum + 0.1
Loop
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|