PDA

View Full Version : Numbers into lines



Lutoniall
12-15-2007, 01:42 PM
Dim Digits(0 To 9)
Digits(0) = Array(1, 1, 1, 1, 1, 1, 0)
Digits(1) = Array(0, 0, 1, 1, 0, 0, 0)
Digits(2) = Array(0, 1, 1, 0, 1, 1, 1)
Digits(3) = Array(0, 1, 1, 1, 1, 0, 1)
Digits(4) = Array(1, 0, 1, 1, 0, 0, 1)
Digits(5) = Array(1, 1, 0, 1, 1, 0, 1)
Digits(6) = Array(1, 1, 0, 1, 1, 1, 1)
Digits(7) = Array(0, 1, 1, 1, 0, 0, 0)
Digits(8) = Array(1, 1, 1, 1, 1, 1, 1)
Digits(9) = Array(1, 1, 1, 1, 1, 0, 1)

InNum = InputBox("Enter number")

If Isnumeric(Innum) Then
If INNum > 0 And InNum < 1000 Then
Hundreds = InNum \ 100
Tens = InNUm \ 10 Mod 10

For Segment = 1 To 7
Controls("Line" & Segment).Visible = Digits(Number)(Segment - 1) = 1
Next

Ive mentioned this before somewhere (I think) but how do change it to do another one with lines 8 to 14? Then 15 to 21 and finally 22 to 28?

XLGibbs
12-15-2007, 01:58 PM
Just change the array dimensions at the top and follow the same syntax

Dim digits (8 to 14)

Digits(8) = Array( )
Digits(9) = Array( )

etc...

Lutoniall
12-15-2007, 02:26 PM
Just change the array dimensions at the top and follow the same syntax

Dim digits (8 to 14)

Digits(8) = Array( )
Digits(9) = Array( )

etc...

These show the numbers to display, so how would I go about displaying numbers 10 - 200

XLGibbs
12-16-2007, 08:24 PM
I don't understand the question.

This is for that digital clock thing from a few weeks ago? How to position the numbers and such, I don't know...I would presume a lot of trial and error on your part.

At the time, i recall, it was going to be pretty labor intensive to do either way.