投稿日 | : 2003/08/10(Sun) 21:35 |
投稿者 | : 花ちゃん |
Eメール | : |
URL | : |
タイトル | : Re: 質問をかえて!! |
全部コードを書いてしまうと勉強にならないし、文書で書くと伝わりにくいので
考え方だけ、どのイベントに書くかエラーチェックをどうするか等工夫して下さい。
又、Text1.MaxLength についても調べて下さい。
Private Sub Text1_Change()
If Len(Text1.Text) >= 3 Then
Label1.Caption = CSng(Text1.Text)
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
KeyAscii = 0
Label1.Caption = CSng(Text1.Text) + CSng("." & Text2.Text)
SendKeys "{TAB}"
End If
End Sub