ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hiding rows on worksheets (https://www.excelbanter.com/excel-programming/317292-hiding-rows-worksheets.html)

bg18461[_11_]

hiding rows on worksheets
 

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:5 3").Select).EntireRow.Hidden
= True

or

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


Any ideas?


--
bg18461
------------------------------------------------------------------------
bg18461's Profile: http://www.excelforum.com/member.php...fo&userid=8877
View this thread: http://www.excelforum.com/showthread...hreadid=315130


John Green[_4_]

hiding rows on worksheets
 
Try the following:

Worksheets("JAN").Range("7:7,29:29,53:53").EntireR ow.Hidden= True


--
John Green
Sydney
Australia


"bg18461" wrote in message
...

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:5 3").Select).EntireRow.Hidd
en
= True

or

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


Any ideas?


--
bg18461
------------------------------------------------------------------------
bg18461's Profile:

http://www.excelforum.com/member.php...fo&userid=8877
View this thread: http://www.excelforum.com/showthread...hreadid=315130




tjh

hiding rows on worksheets
 
try it this way:

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

Selection.EntireRow.Hidden = True



"bg18461" wrote:


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:5 3").Select).EntireRow.Hidden
= True

or

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


Any ideas?


--
bg18461
------------------------------------------------------------------------
bg18461's Profile: http://www.excelforum.com/member.php...fo&userid=8877
View this thread: http://www.excelforum.com/showthread...hreadid=315130




All times are GMT +1. The time now is 07:00 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com