FIX: CommandButton Receives Keystroke from Open DialogID: Q181010
|
If a CommandButton has the focus and is used to open a MessageBox, InputBox, or form, when you use the ENTER key to close the MessageBox, InputBox, or form, the Click event procedure of the CommandButton executes.
The ENTER key strokes returned from an open dialog or other form are interpreted by a CommandButton as a Click event.
There are two workarounds for this problem.
Msgbox "All Done"
Text1.SetFocus
Microsoft has confirmed this to be a problem in the Microsoft products listed
at the beginning of this article.
This problem was corrected in Windows CE Toolkit for Visual Basic 6.0.
This problem occurs when using the ENTER key to close a MessageBox, an InputBox, or another form:
Private Sub Command1_Click()
MsgBox "Command1.Click"
End Sub
Private Sub Text1_Click()
MsgBox "Text1.Click"
End Sub
Books Online for Microsoft Windows CE Toolkit for Visual Basic 5.0
Additional query words: wce vbce vbce5 vbce6
Keywords : kbToolkit kbVBp kbVBp500bug kbVBp600fix kbWinCE kbWinCE100 kbGrpVB
Version : WINDOWS:1.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: February 24, 1999