A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

SendKeys syntax problem



 
 
Thread Tools Display Modes
  #1  
Old January 4th, 2006, 05:57 AM posted to microsoft.public.excel.newusers
external usenet poster
 
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  
Old January 4th, 2006, 10:48 AM posted to microsoft.public.excel.newusers
external usenet poster
 
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  
Old January 4th, 2006, 04:42 PM posted to microsoft.public.excel.newusers
external usenet poster
 
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

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Relationship Problem JNariss New Users 4 December 14th, 2005 08:46 PM
DLookup Syntax Problem jim_9296 General Discussion 1 December 6th, 2005 04:23 PM
Outlook 2003 *Not Responding* ongoing problem, no solutions RedHeadedMenace General Discussion 0 December 2nd, 2005 07:31 PM
Fixing my embedded objects problem JMF General Discussions 2 December 2nd, 2005 07:47 AM
Productkey problem when installing office 2003 on network Stefan Schreurs Setup, Installing & Configuration 1 June 1st, 2004 11:16 PM


All times are GMT +1. The time now is 12:03 PM.


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