Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Toggle button - procedure works but elegance needed (xl2007)
Hi,
I want to use the toggle button control to alternatively hide and unhide a selection. My procedure works fine but I am using a linked cell to give a True or False statement, that the procedure needs. Can the procedure respond directly to the toggle button being pressed instead? Thx in advance. the code: Private Sub ToggleButton1_Click() Dim SimSheet As Worksheet Set SimSheet = ActiveSheet With ActiveSheet Set ToggleVal = Cells(35, 6) If ToggleVal = True Then ActiveSheet.Cells(37, 1).Select Set tbl = ActiveCell.CurrentRegion tbl.Resize(tbl.Rows.Count, tbl.Columns.Count).Select Selection.EntireRow.Hidden = True Else: Selection.EntireRow.Hidden = False End If End With End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
addin menu button xl2007 | Excel Programming | |||
Form button crashes XL2007 | Excel Programming | |||
UNIQ EXPEREINCE: PROCEDURE WORKS FINE USING F8 BUT GET ERROR WHEN COMMAND BUTTON IS CLICKED | Excel Programming | |||
Adding .xla button for Toggle Calculation Button | Excel Programming | |||
defining an event procedure (lostfocus) that works on a column range | Excel Programming |