Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Trying to Send a Keystroke to a specific Window

Hi all

I trying to send a keystroke to a specific window the first command goes all
right but it doesn't send the key. Below is my code.

appactivate "Microsoft Excel - My Book.xls"
SendKeys "{ENTER}"

Jason
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Trying to Send a Keystroke to a specific Window

I would very strongly recommend that not use SendKeys, especially with an
application like Excel that supports automation. If you describe what you
need to accomplish, you will likely get a better approach that SendKeys.

--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


"Jason Zischke" wrote in message
...
Hi all

I trying to send a keystroke to a specific window the first command goes
all
right but it doesn't send the key. Below is my code.

appactivate "Microsoft Excel - My Book.xls"
SendKeys "{ENTER}"

Jason


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 147
Default Trying to Send a Keystroke to a specific Window

Hi Chip

What I am trying to accomplish is I have created like a little program which
prints to another excel window that is open so that the user can keep working
while it prints so I tried sending a keystroke to that window where I have
set up an Onkey
accelerator to preform the print function on demand.

Jason

"Chip Pearson" wrote:

I would very strongly recommend that not use SendKeys, especially with an
application like Excel that supports automation. If you describe what you
need to accomplish, you will likely get a better approach that SendKeys.

--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2008
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)


"Jason Zischke" wrote in message
...
Hi all

I trying to send a keystroke to a specific window the first command goes
all
right but it doesn't send the key. Below is my code.

appactivate "Microsoft Excel - My Book.xls"
SendKeys "{ENTER}"

Jason


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activate an open window and send keystrokes to it. Prometheus[_12_] Excel Programming 3 April 6th 07 05:14 PM
Send data from userform to specific cell on specific sheet? JennLee Excel Programming 10 March 10th 07 02:55 AM
Send key in an inactive window abcsms Excel Programming 2 July 11th 06 11:44 AM
keystroke to close active workbook window Vickie Excel Worksheet Functions 4 December 7th 05 11:21 PM
How can I set up a keystroke for specific lanuage symbols i.e. ā John Raffin Excel Discussion (Misc queries) 1 November 19th 05 05:18 PM


All times are GMT +1. The time now is 02:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"