投稿日 | : 2003/08/12(Tue) 09:53 |
投稿者 | : 花ちゃん |
Eメール | : |
URL | : |
タイトル | : Re^7: Validateイベントについて |
下記のような方法ではだめでしょうか?
Option Explicit
Private ComPos As Boolean
Private Sub Command1_Click()
MsgBox "Command1 がクリックされました"
ComPos = False
End Sub
Private Sub Command1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If ComPos Then Command1.Value = True
End Sub
Private Sub Text1_Validate(Cancel As Boolean)
Dim ret As Integer
ret = MsgBox("テスト中", vbOKCancel)
If ret = vbOK Then
ComPos = True
Else
ComPos = False
End If
' 又は If ret = vbOK Then Command1.Value = True
End Sub