Thread: SendKeys
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lynn[_3_] Lynn[_3_] is offline
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?



.