View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bobt Bobt is offline
external usenet poster
 
Posts: 84
Default Save Cell address to activate it later in the procedure

So, if I understand you code, you want to call a sub routine that takes care
of the column width piece then when it pops back to where you called the
procedure, you would like it to go back to the cell you started on. If
that's the case, simply do one one of the following:

(A) Create a string variable in the calling procedure and pass it the
address of the activecell.

(B) Create a Range variable and in the calling procedure pass it the
activecell.

Following your procedure call use the RANGE command to select your
variable's range.


"loco" wrote:

I am writing a procedure where i am standing in a cell.
Thereafter i shall automatically in the prosedure change the width of column
D-E from 20 to 40.

Afterwards i want the same cell to be active as it was before i started the
procedure.

I am using relative reference in the procedure.

Can someone please help me with how i save an cell adrress for reuse later?