hiding rows on worksheets

  • Thread starter Thread starter bg18461
  • Start date Start date
B

bg18461

I have a macro that will hide/unhide certain rows on sheets in my
workbook, however i get ' Object doesn't support this property or
method' error when i use the code below:

Worksheets(Worksheets("JAN").Range("7:7,29:29,53:53").Select).EntireRow.Hidden
= True

or

Sheets("JAN").Range("7:7,29:29,53:53").Select
Worksheets("JAN").Selection.EntireRow.Hidden = True


Any ideas?
 
Try the following:

Worksheets("JAN").Range("7:7,29:29,53:53").EntireRow.Hidden= True
 
try it this way:

Sheets("JAN").Range("7:7,29:29,53:53").Select

Selection.EntireRow.Hidden = True
 

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