vendredi 21 octobre 2016

VB - Unchecking Check Boxes in a Group Box: Answer doesn't work

I found a possible answer to my question on how to do this here

However the code from that question:

Sub UnCheckBoxes()
Dim ChkBox As CheckBox = Nothing
    ' to unchecked all
    For Each ChkBox As Object In Worksheets("Check sheet").Report_Checks.Controls
        If TypeOf xObject Is CheckBox Then
            ChkBox = xObject
            ChkBox.Checked = False
        End If
    Next
End Sub

Produces a 'Compile error: syntax error'. Any help appreciated




Aucun commentaire:

Enregistrer un commentaire