Hi all
I suck with arrays....My scenario as follows:
I have 7 checkboxes on a frame on a user form
I am wanting to loop through checkboxes populate sheets based on True value of cb into array and copy those sheets only to newbook and save in selected path...
This is what i have so far...
![]()
Private Sub CommandButton79_Click() Dim cb As MSForms.Control, i As Integer, ii As Integer, wsArr() As String ii = 2 For Each cb In UserForm3.Frame7.Controls If TypeOf cb Is MSForms.CheckBox Then If cb = True Then MsgBox cb.Name ReDim Preserve wsArr(i) wsArr(i) = "Sheet" & ii i = i + 1 End If ii = ii + 1 End If Next cb 'Copy sheets stored to new book End Sub
Bookmarks