Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
VBAvirgin
 
Posts: n/a
Default SendKeys syntax problem


Can anyone please help.
I am performing a search, that part of the code is working fine.
When my result cell is activated, I would like to select both it, and
the cell to the immediate right of it.
I've tried using SendKeys, but I'm having difficulties with the syntax
obviously.

Code:
--------------------
Application.SendKeys +("{RIGHT}")
--------------------

I'm using the "plus"sign "+" for the SHIFT key to hold and select, but
I'm obviously writing the {RIGHT} portion of the code incorrectly, as I
get a run time error.
Any assitance would be much appreciated. This is driving me nuts. Thanx
in Advance.


--
VBAvirgin
------------------------------------------------------------------------
VBAvirgin's Profile: http://www.excelforum.com/member.php...o&userid=16327
View this thread: http://www.excelforum.com/showthread...hreadid=497814

  #2   Report Post  
Posted to microsoft.public.excel.newusers
Bob Phillips
 
Posts: n/a
Default SendKeys syntax problem

Maybe try

application.sendkeys ("+{RIGHT}")

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"VBAvirgin" wrote
in message ...

Can anyone please help.
I am performing a search, that part of the code is working fine.
When my result cell is activated, I would like to select both it, and
the cell to the immediate right of it.
I've tried using SendKeys, but I'm having difficulties with the syntax
obviously.

Code:
--------------------
Application.SendKeys +("{RIGHT}")
--------------------

I'm using the "plus"sign "+" for the SHIFT key to hold and select, but
I'm obviously writing the {RIGHT} portion of the code incorrectly, as I
get a run time error.
Any assitance would be much appreciated. This is driving me nuts. Thanx
in Advance.


--
VBAvirgin
------------------------------------------------------------------------
VBAvirgin's Profile:

http://www.excelforum.com/member.php...o&userid=16327
View this thread: http://www.excelforum.com/showthread...hreadid=497814



  #3   Report Post  
Posted to microsoft.public.excel.newusers
VBAvirgin
 
Posts: n/a
Default SendKeys syntax problem


Thank You Bob for your quick & helpful response. I knew it was just a
what goes where thing that was bogging me down. Thanx again my
friend.:)


--
VBAvirgin
------------------------------------------------------------------------
VBAvirgin's Profile: http://www.excelforum.com/member.php...o&userid=16327
View this thread: http://www.excelforum.com/showthread...hreadid=497814

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
Urgent Help Required on Excel Macro Problem Sachin Shah Excel Discussion (Misc queries) 1 August 17th 05 06:26 AM
Problem With Reference Update Egon Excel Worksheet Functions 17 July 16th 05 05:45 AM
Syntax problem Alex H Excel Worksheet Functions 1 July 2nd 05 08:23 AM
Copy an Drag cell Formula Problem Nat Excel Discussion (Misc queries) 1 June 20th 05 03:24 PM
problem office assistant R.VENKATARAMAN Excel Discussion (Misc queries) 0 June 15th 05 06:22 AM


All times are GMT +1. The time now is 06:10 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"