View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default referring to a row that contains a single cell

Sub hidenamedcellrow()
Range("MyCell").EntireRow.Hidden = True
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Paul" wrote in message
...
I would like to write VBA code to hide an entire row which contains a
single cell named "MyCell." That is, I don't know which row MyCell" will
be in, but whatever row it's in, that's the row I want to hide.

The sheet will always be the ActiveSheet. How can I write a line of code
that will hide the row that "MyCell" is in?

Thanks in advance,

Paul