View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Conan Kelly Conan Kelly is offline
external usenet poster
 
Posts: 98
Default Range variables and Freeze Panes

Hello all,

First, how do I assign a cell (or range) to a range variable (you will
see in my code posted below).

Second, can I refer to the Home Cell (the cell at which the panes are
frozen--[Ctrl] + [Home]) without actually selecting it?

What I'm trying to do is create a macro that will:
- Freeze the panes where the cursor is at if they are not already
frozen
- toggle frozen panes if panes are frozen and the active cell is
the Home Cell
- move the frozen panes to the current cell if panes are frozen
and active cell is different than the Home Cell

The one thing I'm concerned with by using the sendkeys command to get
the Home Cell address and then reselecting the current cell is that my
screen will move. That is why I want to be able to refer to the Home
Cell w/o actually selecting it.

Thanks for any help anyone can provide,

Conan Kelly