#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default SendKeys

You can use this

ActiveCell.FormulaR1C1 = "Good"
Application.Goto Cells(1), True
ActiveCell.FormulaR1C1 = "Morning"

Try to avoid Sendkeys


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Lynn" wrote in message ...
I would like to use the SendKeys statement to perform the
Ctrl + Home keystrokes in my macro. The following
statement works on its own:

Application.SendKeys "^{home}", True

As soon as I combine it with other statements in the
macro, however, it doesn't work. Eg:

ActiveCell.FormulaR1C1 = "Good"
Application.SendKeys "^{home}", True
ActiveCell.FormulaR1C1 = "Morning"

What am I doing wrong?



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default SendKeys

Thanks for your suggestion Ron. If I have frozen panes,
however, the result is not the same as Ctrl + Home. I
conclude from your comment that SendKeys is flaky in VBA?

-----Original Message-----
You can use this

ActiveCell.FormulaR1C1 = "Good"
Application.Goto Cells(1), True
ActiveCell.FormulaR1C1 = "Morning"

Try to avoid Sendkeys


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Lynn" wrote in message

...
I would like to use the SendKeys statement to perform

the
Ctrl + Home keystrokes in my macro. The following
statement works on its own:

Application.SendKeys "^{home}", True

As soon as I combine it with other statements in the
macro, however, it doesn't work. Eg:

ActiveCell.FormulaR1C1 = "Good"
Application.SendKeys "^{home}", True
ActiveCell.FormulaR1C1 = "Morning"

What am I doing wrong?



.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default SendKeys

Hi Lynn

Use this for example with 6 rows freeze

Application.Goto Cells(7, 1), True

conclude from your comment that SendKeys is flaky in VBA?

Yes use it only if there is nothing else

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Lynn" wrote in message ...
Thanks for your suggestion Ron. If I have frozen panes,
however, the result is not the same as Ctrl + Home. I
conclude from your comment that SendKeys is flaky in VBA?

-----Original Message-----
You can use this

ActiveCell.FormulaR1C1 = "Good"
Application.Goto Cells(1), True
ActiveCell.FormulaR1C1 = "Morning"

Try to avoid Sendkeys


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Lynn" wrote in message

...
I would like to use the SendKeys statement to perform

the
Ctrl + Home keystrokes in my macro. The following
statement works on its own:

Application.SendKeys "^{home}", True

As soon as I combine it with other statements in the
macro, however, it doesn't work. Eg:

ActiveCell.FormulaR1C1 = "Good"
Application.SendKeys "^{home}", True
ActiveCell.FormulaR1C1 = "Morning"

What am I doing wrong?



.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default SendKeys

Thanks Ron!

-----Original Message-----
Hi Lynn

Use this for example with 6 rows freeze

Application.Goto Cells(7, 1), True

conclude from your comment that SendKeys is flaky in

VBA?
Yes use it only if there is nothing else

--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Lynn" wrote in message

...
Thanks for your suggestion Ron. If I have frozen panes,
however, the result is not the same as Ctrl + Home. I
conclude from your comment that SendKeys is flaky in

VBA?

-----Original Message-----
You can use this

ActiveCell.FormulaR1C1 = "Good"
Application.Goto Cells(1), True
ActiveCell.FormulaR1C1 = "Morning"

Try to avoid Sendkeys


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Lynn" wrote in message

...
I would like to use the SendKeys statement to perform

the
Ctrl + Home keystrokes in my macro. The following
statement works on its own:

Application.SendKeys "^{home}", True

As soon as I combine it with other statements in the
macro, however, it doesn't work. Eg:

ActiveCell.FormulaR1C1 = "Good"
Application.SendKeys "^{home}", True
ActiveCell.FormulaR1C1 = "Morning"

What am I doing wrong?


.



.

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
sendkeys string hawki Excel Discussion (Misc queries) 4 May 11th 07 08:30 PM
SendKeys syntax problem VBAvirgin New Users to Excel 2 January 4th 06 04:42 PM
SendKeys function moglione1 Excel Discussion (Misc queries) 1 November 7th 05 02:57 PM
Open Filename + SendKeys Matthew[_6_] Excel Programming 5 July 31st 03 04:12 PM
sendkeys mark poole Excel Programming 0 July 11th 03 03:47 PM


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