Link to home
Start Free TrialLog in
Avatar of ahammar
ahammarFlag for United States of America

asked on

Problem with Sendkeys

I have a text box with multiline set to true.
I put multiple lines of text in it

For example:
In Form2.Text1 I have:
Line1
Line2
Line3

Then:


Then I set focus to another text box on a different form and use sendkeys like this:
Form1.Text1.SetFocus
SendKeys Chr(34) & Me.Text1.Text & Chr(34)
"Line1

Line2

Line3"

It's inserting and extra return between each line.
Any body know how I can solve this problem.
I know Sendkeys isn't the best thing to use, but  it does fit with my situation


Thanks!
Cheers!
ahammar

ASKER CERTIFIED SOLUTION
Avatar of iHadi
iHadi
Flag of Syrian Arab Republic image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ahammar

ASKER

Hi iHadi,

Thank you!!  It works great!
The points are all yours

Cheers!
ahammar
You're welcome