You could utilize a loop and a boolean variable. Example below:

Private Sub CommandButton1_Click()
Dim i As Integer
Dim bChecked As Boolean:    bChecked = False
Dim msg

For i = 1 To 10
    If Me.Controls("CheckBox" & i).Value = True Then
        bChecked = True
        Exit For
    End If
Next i

If bChecked = False Then
    msg = MsgBox("No checkboxes have been checked.  Do you want to continue?", vbYesNo)
    'Exit Sub on vbYes.....
End If

End Sub