-
Mar 4th, 2002, 10:58 AM
#1
Thread Starter
Addicted Member
Send keys to textbox
Hi, can anyone teach me how to send certain keys to a textbox. Something like sending a key to move to the next line or TAB.
The line is something like this:
text1.text = "blah blah blah" & (Enter) & "kay kay kay" & (TAB)
How do you do just that?
Thanks!
"If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"
-
Mar 4th, 2002, 11:21 AM
#2
Hyperactive Member
here you go................
text1.text = "blah blah blah" & VBCRLF & "kay kay kay" & vbtab
-
Mar 4th, 2002, 11:22 AM
#3
Bouncy Member
if you want to send carriage returns and tabs to a textbox you can use the VB constants: vbCrLf and vbTab.
i.e.
VB Code:
Text1.Text = "1st line" & vbCrLf & "2nd Line" & vbTab & "Tab!"
you will also have to set the Textbox's MultiLine property to True if you're going to be adding carriage returns
-
Mar 4th, 2002, 11:29 AM
#4
Thread Starter
Addicted Member
"If ignorance is bliss, that probably explain why I'm in a such a mess right now!!"
-
Mar 4th, 2002, 11:36 AM
#5
Hyperactive Member
hey darre isn't that what i told him
anyways here is another way you could send some keys
text1.setfocus
SendKeys "{Home}+{End}"
Hope it helps
-
Mar 4th, 2002, 11:47 AM
#6
Bouncy Member
Originally posted by deane034
hey darre isn't that what i told him
yup although if you look at the post-times, i was probably typing at the same time as you
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
|