Dim ctrl As Button
Select Case ctrl
Why does this not work? Because ctrl is not initialized. It is a variable, but it does not have a value.
Set ctrl = Screen.ActiveControl
Now the control has a value. Note the use of "Set" because this is an object, not a simple integer or string.
Then it...