View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
jaf jaf is offline
external usenet poster
 
Posts: 300
Default SendKeys {Enter} acts like Return rather than Enter

Hi Robert,
What happens if you type TRAN and press enter in QMF?

If this is like a VBA userform textbox.
Then does the ENTER event in the textbox do something, or do you need to set
the focus on a button to create an event that starts the processing?

--

John

johnf202 at hotmail dot com


"Robert Chapman" wrote in message
...

I'm trying to automate QMF from Excel (to automate the
process of exporting a QMF query as an Excel file). This
involves selecting the QMF application and using Sendkeys
to send all the relevant keystrokes. The only problem is
when I try:

Sendkeys "TRAN", True
Sendkeys "{Enter}", True

TRAN appears onscreen but then Enter isn't pressed. It
appears that Return is pressed since the cursor moves to
the beginning of the line as when you press Return in
QMF. Given that Enter and Return have the same effect in
Excel is there another way I need to refer to Enter to get
this command to work in another application?

Many thanks for any help.

Rob