Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case Chr(KeyAscii)
Case "1"
Me.Text1.SelText = "Ⅰ"
Case "2"
Me.Text1.SelText = "Ⅱ"
Case "3"
Me.Text1.SelText = "Ⅲ"
Case "4"
Me.Text1.SelText = "Ⅳ"
Case "5"
Me.Text1.SelText = "Ⅴ"
Case "6"
Me.Text1.SelText = "Ⅵ"
Case "7"
Me.Text1.SelText = "Ⅶ"
Case "8"
Me.Text1.SelText = "Ⅷ"
Case "9"
Me.Text1.SelText = "Ⅸ"
Case "0"
Me.Text1.SelText = "Ⅹ"
Case Else
Exit Sub
End Select
Me.Text1.SelStart = Me.Text1.SelStart + Len(Me.Text1.SelText)
Me.Text1.SelLength = 0
KeyAscii = 0
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
Select Case Chr(KeyAscii)
Case "1"
Me.Text1.SelText = "I"
Case "2"
Me.Text1.SelText = "II"
Case "3"
Me.Text1.SelText = "III"
Case "4"
Me.Text1.SelText = "IV"
Case "5"
Me.Text1.SelText = "V"
Case "6"
Me.Text1.SelText = "VI"
Case "7"
Me.Text1.SelText = "VII"
Case "8"
Me.Text1.SelText = "VIII"
Case "9"
Me.Text1.SelText = "IX"
Case "0"
Me.Text1.SelText = "O"
Case Else
Exit Sub
End Select
Me.Text1.SelStart = Me.Text1.SelStart + Len(Me.Text1.SelText)
Me.Text1.SelLength = 0
KeyAscii = 0
End Sub