Why is control not defined?
Hi there
I'm working on a simple macro where a button clears all checkboxes. Any reason why Visual Studio is saying "Type 'Control' is not defined" and "Typed 'CheckBox' is not defined" ?
Private Sub ClearSelection_Click(sender As Object, e As EventArgs) Handles ClearSelection.Click
For Each ctrl As Control In Me.Controls
If TypeOf ctrl Is CheckBox Then
DirectCast(ctrl, CheckBox).CheckState = CheckState.Unchecked
End If
Next
End Sub
Thanks a lot
James
|