Is there a way to change the background color of all controls on a form via code?

Hello, all.

As winter is coming up and there's a lot of bright light during the day and then it gets dark quickly I thought about making a button on a form that lets the user switch between light and dark form control backgrounds.

I started with buttons based on code which I found online that seemed to make sense (I would later add more control types as necessary):

Private Sub CommandButton39_Click()
    Dim ctrl As Control
    Dim ct As String
    ct = "CommandButton"
    For Each ctrl In niTestIT.Controls
        If TypeName(ctrl) = ct Then
            ctrl.BackColor = RGB(64, 64, 64)
        End If
    Next ctrl

End Sub

But I get a "Type mismatch" error. Any idea of what I am doing wrong?