|
-
May 1st, 2008, 02:06 PM
#1
Thread Starter
New Member
Noobish question
How should i make a String called 'packets' send to Text2_Change.. And let it say "Found!"
Code:
Private Sub Text2_Change()
if packets = "word" then
msgbox "Found"
end if
end Sub
And yes, i'm doing other stuff with the sub.. this is just an example..
IF the option Change isn't possible.. how should i send the "packets" to the Sub..
Thanks in advance..
-
May 1st, 2008, 02:17 PM
#2
Frenzied Member
Re: Noobish question
You can't add extra parameters to the event handler; but, does something like this work for you?
Code:
Private Sub Text2_Change()
call AnotherSub(Text2.Text)
End Sub
Private Sub AnotherSub(byval packets as string)
if packets = "word" then
msgbox "Found"
end if
end Sub
-
May 1st, 2008, 02:22 PM
#3
Thread Starter
New Member
Re: Noobish question
 Originally Posted by PilgrimPete
You can't add extra parameters to the event handler; but, does something like this work for you?
Code:
Private Sub Text2_Change()
call AnotherSub(Text2.Text)
End Sub
Private Sub AnotherSub(byval packets as string)
if packets = "word" then
msgbox "Found"
end if
end Sub
I could use it.. But the "Anothersub" is on another form :d
-
May 1st, 2008, 09:15 PM
#4
Lively Member
Re: Noobish question
if "Anothersub" is on another form, then surely you can use
-
May 2nd, 2008, 06:27 AM
#5
Re: Noobish question
You can do what calumrulez suggests, but only if the sub on the other form is declared as Public.
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
|