Hide/unhide with macro

R

RT

Hi

Just a small question

Using macros I hide and unhide some rows for printing purposes

See sample below

It all works fine

the only hicup I have is that I would like the return to the active cell
after the macro has finished
As it is now when I reveal the rows they stay selected

Anybody got an idea

Thank you
Rex
 
B

Bernie Deitrick

Rex,

At the top of your code, insert

Dim myCell As Range
Set myCell = ActiveCell

and at the bottom of the code, after everything has run.

myCell.Select

HTH,
Bernie
MS Excel MVP
 
R

RT

Hi

Thanks a million (well maybe not that much, let's say a hundred, OK?)

It works, and keeps me satisfied

What more does the cat need to be happy?

Thanks again

And speak to you later

Rex
 
Top