Hide VBA code help

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My newly created workbooks (in Excel 2003) do not hide the rows as expected
with the simple vba code below. It is one that I have been using all along.

My old workbooks work fine... but something has changed. Can someone please
advise?

Could it be a version issue between older Excel and 2003?

Sub hide_it()
Columns("E:IV").Hidden = True
Rows("16:65536").Hidden = True
End Sub

Gives me the proper hidden columns but not the rows!

TIA for any help!
GerryK
 
Rows("16:65536").Hidden = True

Using Excel 2003... this line works fine for me. It even works for me in
Excel 2007 (although it doesn't hide all the rows as Excel 2007 has more
than 65536 of them).

Rick
 
Maybe somthing like this

Rows("16:65536").EntireRow.Hidden = True
Columns("E:IV").EntireColumn.Hidden = True
 
Thank you, however, I'm now gertting a run time 400 error when I run the Hide
It macro from the drop down!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top