Consulting

Results 1 to 6 of 6

Thread: ActiveX Option Buttons No Longer Function After Hide Then Unhide Rows

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    ActiveX Option Buttons No Longer Function After Hide Then Unhide Rows

    I have a spreadsheet with ActiveX option buttons in groups. They are ActiveX buttons, not Form Controls buttons. Those buttons are in rows 7:30. I have a command button (also ActiveX) with the caption "Hide" that will hide rows 7:30 and then change the caption to "Show." When I click on that command button again, it unhides rows 7:30 and changes the caption to "Hide." After hiding/unhiding those rows, the option buttons no longer work. When I click on one, a "ghost" option button appears below the selected option button on mouse-down, and then the ghost option button disappears on mouse-up.

    Command button code (pretty basic):
    Option Explicit
    
    Private Sub CommandButton1_Click()
    
    
        If CommandButton1.Caption = "Hide" Then
            Rows("2:6").EntireRow.Hidden = True
            CommandButton1.Caption = "Show"
        Else
            Rows("2:6").EntireRow.Hidden = False
            CommandButton1.Caption = "Hide"
        End If
    
    
    End Sub
    In order to get the option buttons to work again, I must close and reopen the workbook.

    I created a second test spreadsheet (attached) to see if this behavior was unique, and the second test spreadsheet displays the same behavior.

    If anyone knows what may be causing this and, more importantly, how to keep it from happening, that would be wonderful!
    Attached Files Attached Files

Tags for this Thread

Posting Permissions

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