Hi, Bishonen,
if the checkboxes are named CheckBox01, CheckBox02 etc.:
Private Sub CommandButton1_Click()
Dim obj As Object
Dim rngBig As Range
For Each obj In Controls
If Left(obj.Name, 8) = "CheckBox" Then
If obj Then
If rngBig Is Nothing Then
Set rngBig = Cells(1, Right(obj.Name, 2) * 1).EntireColumn
Else
Set rngBig = Union(rngBig, Cells(1, Right(obj.Name, 2) * 1).EntireColumn)
End If
End If
End If
Next obj
If Not rngBig Is Nothing Then
rngBig.Select 'only check out, no need for Selection otherwise
End If
End Sub
Ciao,
Holger
Bookmarks