Results 1 to 3 of 3

using form command button as toggle

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-19-2012
    Location
    NYC
    MS-Off Ver
    Excel 2010
    Posts
    137

    using form command button as toggle

    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
    Last edited by Willardio; 01-27-2013 at 07:10 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1