Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative way to refer to a row to hide or unhide...
Hi There, I currently have a simple VB that selects data in row 60 and 61 (see below). Problem is that if a user adds lines (and its quite possible that he may) the macro will not hide the correct row. Is there VB to hide a named range...? Kind regards Darin Rows("60:61").Select Selection.EntireRow.Hidden = True *** Sent via Developersdex http://www.developersdex.com *** |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative way to refer to a row to hide or unhide...
Select the rows you want hidden, click in the address window (upper left of
sheet where you see the cell reference). Type a name in that window to give the selected rows a "Named Range". Then put that name in your code in place of the rows reference. This way, when rows are added above, the named range will remain constant. -- Best wishes, Jim "Darin Kramer" wrote: Hi There, I currently have a simple VB that selects data in row 60 and 61 (see below). Problem is that if a user adds lines (and its quite possible that he may) the macro will not hide the correct row. Is there VB to hide a named range...? Kind regards Darin Rows("60:61").Select Selection.EntireRow.Hidden = True *** Sent via Developersdex http://www.developersdex.com *** |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative way to refer to a row to hide or unhide...
Assign a Named Range to the rows and use the name:
Sub demo() Range("ready_for_hide").EntireRow.Hidden = True End Sub The named cells will adjust as rows are added or deleted. -- Gary''s Student gsnu200706 "Darin Kramer" wrote: Hi There, I currently have a simple VB that selects data in row 60 and 61 (see below). Problem is that if a user adds lines (and its quite possible that he may) the macro will not hide the correct row. Is there VB to hide a named range...? Kind regards Darin Rows("60:61").Select Selection.EntireRow.Hidden = True *** Sent via Developersdex http://www.developersdex.com *** |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Alternative way to refer to a row to hide or unhide...
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hide/Unhide row VBA | Excel Discussion (Misc queries) | |||
hide/unhide | Excel Discussion (Misc queries) | |||
Hide Unhide | Excel Discussion (Misc queries) | |||
Hide/unhide | Excel Worksheet Functions | |||
hide/unhide | Excel Programming |