Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a worksheet that contains several rows that need to be hidden /
unhidden via a macro attached to a button (from the Form toolbar). I'd like to create one macro for all buttons. What I need to know is how to reference the cell (or row) that the selected button is located in. I can then hide the relevant rows below it. Heres my code so far. It currently require the user to select a cell on the row that the button is located. Sub Button2_Click() 'HIDE For i = 1 To 5 ActiveCell.Offset(i, 0).EntireRow.Hidden = True Next i End Sub Thanks Trevor |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
using the active cell as a reference in a function | Excel Worksheet Functions | |||
How to reference an active cell | New Users to Excel | |||
XL2002: Button Labels & Sheets... | Excel Programming | |||
Active row cell reference | Excel Worksheet Functions | |||
Active Cell Reference | Excel Worksheet Functions |