|
-
Nov 6th, 1999, 02:59 PM
#1
Thread Starter
New Member
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).]
-
Nov 6th, 1999, 08:03 PM
#2
Lively Member
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
-
Nov 6th, 1999, 09:40 PM
#3
Fanatic Member
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).]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|