-
I have that small problem with SetFocus after a MessageBox Prompt. It just doesn't work. My question is where should I put SetFocus code (what Event) to make it works after users clicks any button on a messagebox.
Thanks
------------------
Marek Karbarz
My WebPage
[email protected]
[This message has been edited by Slimak (edited 11-07-1999).]
-
I think this is what you're after,
Add a command button and a textbox to form1
Option Explicit
Private Sub Command1_Click()
Dim Result As VbMsgBoxResult
Result = MsgBox("Would you like to set the focus to the textbox?", vbQuestion + vbYesNo, "Set Focus")
If Result = vbYes Then
Text1.SetFocus
End If
End Sub
-
Thanks
------------------
Visual Basic Programmer (at least I want to be one)
------------------
PolComSoft
You will hear a lot about it.
P.S. QWERTY=SLIMAK
[This message has been edited by QWERTY (edited 11-07-1999).]