Link to home
Start Free TrialLog in
Avatar of ecj1
ecj1

asked on

VB SendKey Problem

I am currently automating the edit comment procedure within Excel 97 using VB.  I am using the SendKey command to enter text into a comment field:
Application.SendKeys ("%IE")
This works successfully but the menu remains active on the window and requires a "return" to disappear and activate the comments window.  I have tried using variations on the following:
Application.SendKeys ("%IE {ENTER}")
to try and resolve this, all to no avail.

Best regards,

Rob.
Avatar of ecj1
ecj1

ASKER

Edited text of question
ASKER CERTIFIED SOLUTION
Avatar of jgv
jgv

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
ecj1:

For some reason sending Enter as {ENTER} does not work in this case. Use:

Application.SendKeys "%IE~"

The ~ is recognized as the ENTER key and does work.
Avatar of ecj1

ASKER

jgv,

many thanks for you help.

ecj1