Numbers into lines

Lutoniall

New member
Local time
Today, 08:52
Joined
Nov 2, 2007
Messages
5
This what I have so far:

Code:
Private Sub Change_Number_Click()
Dim LCD(0 To 9)
LCD(0) = Array(1, 1, 1, 1, 1, 1, 0)
LCD(1) = Array(0, 0, 1, 1, 0, 0, 0)
LCD(2) = Array(0, 1, 1, 0, 1, 1, 1)
LCD(3) = Array(0, 1, 1, 1, 1, 0, 1)
LCD(4) = Array(1, 0, 1, 1, 0, 0, 1)
LCD(5) = Array(1, 1, 0, 1, 1, 0, 1)
LCD(6) = Array(1, 1, 0, 1, 1, 1, 1)
LCD(7) = Array(0, 1, 1, 1, 0, 0, 0)
LCD(8) = Array(1, 1, 1, 1, 1, 1, 1)
LCD(9) = Array(1, 1, 1, 1, 1, 0, 1)

ChangePrice = InputBox("Enter price per litre")

For Segment = 1 To 7
    Controls("Line" & Segment).Visible = LCD(ChangePrice)(Segment - 1) = 1
Next
End Sub

This displays a number in a seven segment display. But I want it to be able to show it in hundreds, tens & decimals eg. XXX.X Is there any way when typing into a inputbox that it comes up with a number. E.g 134.9 as I can only make it display on number at a time.
 
The change event fires once for each character typed into a field. If you want to capture the entire string at once, use either the BeforeUpdate event or the AfterUpdate event depending on what you need to do with the data.
 

Users who are viewing this thread

Back
Top Bottom