Dim CountryObjButs as Collection 'add to code as Module level variable
cn = Sheet8.Cells(j, 1).Value
With opB1
.Caption = cn
' .Name = "obCountry" & i ' Commented out
.Height = 18
.Width = 120
.Left = 130
.Top = t
.Font.Size = 12
End With
CountryObjButs.Add opB1 'add to code inside loop
Private Sub CBPtoceed_Click()
Dim AButtonIsSelected As Boolean
Dim Ctrl As Control
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
For Each Ctrl in CountryObjButs
If IsNull(Ctrl) Then Goto CtrlNext 'Due to Quirks of Null math
AButtonIsSelected = AButtonIsSelected + Ctrl.Value
CtrlNext:
Next
If Not AButtonIsSelected Then
MsgBox "Please select at least ONE Option!!>>>", vbOKOnly, " PLEASE SELECT AN OPTION!!!"
Exit Sub
End If