easy roman numerals
could someone make this program actually do roman numerals.
Dim a As Integer
Dim b As Integer
Dim Digit As Integer
Dim RomanNumber As String
Dim RomanDigit As String
Roman = InputBox("Type in number", "Numerals", "X")
a = Len(Roman)
RomanNumber = Roman
RomanNumber = UCase(RomanNumber)
For b = a To 1 Step -1
RomanDigit = Mid$(RomanNumber, b, 1)
Select Case RomanDigit
Case "L"
Digit = 50
Case "C"
Digit = 100
Case "D"
Digit = 500
Case "M"
Digit = 1000
Case "X"
Digit = 10
Case "I"
Digit = 1
Case "V"
Digit = 5
Case Else
MsgBox ("Invalid Character")
End Select
firstnumeral = Digit
secondnumeral = secondnumeral + firstnumeral
If secondnumeral > firstnumeral Then
secondnumeral = secondnumeral - First
End If
Next
MsgBox "Numeral " & secondnumeral
|