im t1, ykr AsCurrency

PrivateSub Command1_Click()
End
EndSub

PrivateSub Command2_Click()
If Text1.Text <> ""Then
t1 = CCur(Text1.Text)
Text2.Text = Int(t1 / 1000000)
ykr = Int((t1 Mod 1000000) / 10000)
If Text1.TextMod 10000 >= 5000 Then Text3.Text = ykr + 1 Else Text3.Text = ykr
EndIf
EndSub

PrivateSub Text1_KeyDown(KeyCode AsInteger, Shift AsInteger)
If KeyCode = 13 ThenCall Command2_Click
EndSub