View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rodney Baker Rodney Baker is offline
external usenet poster
 
Posts: 7
Default Hide Excel row in VBA

I use something like
activecell.entirerow.hidden = true

or

Rows("28").EntireRow.Hidden = True

Either should work.

Rodney.

"Dave Peterson" wrote in message
...
How are you running the code?

If it's from a control from the control toolbox toolbar, try adding:

activecell.activate

near the top of your code.

(or change the .takefocusonclick to false (if the control has that

property.))



RichC wrote:

Help! I'm using Excel 97 and I am trying to hide a
spreadsheet row using VBA. This code is not working:

activesheet.Rows("28").Hidden = True

The message is 'unable to set the Hidden property of the
Range class.' The sheet is not protected.

Any suggestions?

Rich


--

Dave Peterson