I need to make a toggle out of a command button because Activex check boxes disappear when the row they are in is hidden, even with "move and size" selected. Here's what I was thinking must be close to what i need:
Sub FRtog1()
Dim Rngfnd As Range
Set Rngfnd = ActiveSheet.UsedRange.Find(What:="report02", LookAt:=xlPart)
With Rngfnd
If Range(Cells(.Row - 1, "A"), Cells(.Row - 43, "A")).Value = "FR" Then
Range(Cells(.Row - 1, "A"), Cells(.Row - 43, "A")).Value = ""
pvt_xls_Worksheet.Range("$A$22:$L$2200").AutoFilter Field:=1, Criteria1:="<>"
Else
Range(Cells(.Row - 1, "A"), Cells(.Row - 43, "A")).Value = "FR"
pvt_xls_Worksheet.Range("$A$22:$L$2200").AutoFilter Field:=1, Criteria1:="<>"
End If
End With
End Sub
Users should click it to unhide the rows, then click again to re-hide the rows based on a filter at column A. I don't care if the button stays depressed or not.
Thanks in advance for any advice.
Willardio
Bookmarks