TIP: Click on subject to list as thread! ANSI
echo: visual_basic
to: All
from: Shell
date: 2004-11-24 07:40:00
subject: Re: SetFocus

In responce to the post:
 On Tue, 23 Nov 2004 20:47:58 +0100, "asd987" 
stated...and I replied:

>Hello,
>
>I'm having problems with the "SetFocus"-statement.
>
>When I'm typing in textbox Text1 and then click an Optiobutton Iwant the 
>focus back on the textbox. Itried to do this with the
>
>Private Sub Option1_Click()
>Text1.SetFocus
>End Sub
>
>but I get the following error: "Invalid procedure or argument" 
>(runtime-error 5)
>
>How can I get the focus on the textbox?
>
>Thanks,
>
>Sjoerd
>
>
Try this...

Private Sub Option1_Click()
Me.Text1.SetFocus
End Sub

vb has all these things that can help people, like "Option Explicit"
and "Me" (to refer to the Current form), and so many people don't use
them.  It's really sad.
Shell
-
http://drshell.home.mindspring.com/
Into computers since 1972.
WARNING! Information and e-mail addresses contained herein, are for
personal use only. By entering this site, you agree that you will use this
data only for lawful purposes and that, under no circumstances will you use
this data to: allow, enable, or otherwise support the transmission of mass
unsolicited, commercial advertising or solicitations via direct mail,
electronic mail, or by telephone. Violators will be dealt with accordingly.
-
---
þ RIMEGate(tm)/RGXPost V1.14 at BBSWORLD * Info{at}bbsworld.com

---
 * RIMEGate(tm)V10.2áÿ* RelayNet(tm) NNTP Gateway * MoonDog BBS
 * RgateImp.MoonDog.BBS at 11/24/04 7:40:34 AM
* Origin: MoonDog BBS, Brooklyn,NY, 718 692-2498, 1:278/230 (1:278/230)
SEEN-BY: 633/267 270 5030/786
@PATH: 278/230 10/345 106/1 2000 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.