View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default Macro to select cells at current cell

On Mon, 5 Jan 2009 11:39:02 -0800, cvgairport
wrote:

Hi there,

Can a VB macro be written to hide 3 rows at the cell position - no matter
where the current cell position is. I can write a macro to select specific
row numbers, but I want one that will take the 3 rows from the current cell.

Thanks!

Amy




Try this

Selection.Resize(3, 1).EntireRow.Hidden = True

This will hide the (top) row of the current selection together with
the two following rows.

Hope this helps / Lars-Åke