View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.programming
tc69 tc69 is offline
external usenet poster
 
Posts: 19
Default Working around SendKeys limitations

Right off the top of my head, that won't work if you have Hidden Columns /
Rows at the Pane borders (which you probably won't in most cases). If you
want to determine Ctrl-Home Active Cell position "all" cases, you basically
have to do what my Sub does to determine where to move the ActiveCell. Trust
me, I've tested pretty well tested the possible scenarios.

"Bob Phillips" wrote:

If Not ActiveWindow.FreezePanes Then
Cells(1).Select
Else
Cells(ActiveWindow.SplitRow + 1, ActiveWindow.SplitColumn + 1).Select
End If


--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

<charles wrote in message ...
Sorry to intrude on your programming conversation, but I picked up your
link on a google search - your discussion seems to revolve around a
similar issue that I can't resolve with my limited VB experience.

Not quite sure if I'll get a response, but here goes:

SendKeys ("^{HOME}") works fine in emulating the Ctrl-Home keystroke.
However if you use it within a routine to determine the required ctrl-home
cell address, it fails, as it only positions the cursor once the routine
is complete and active control is passed back to the user.

Is there any way of inserting code into a routine that would determine the
ctrl-home cell position of the active sheet?

Your expert input would be most appreciated.

Thanks, Charles.



EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com