- Joined
- Aug 25, 2009
- Messages
- 2
- Reaction score
- 0
I have a user form in Excel with several arrays of checkboxes. Some of the checkboxes are in more than one array. I have a command button on the form and I need the code to work something like this...
For Each checkbox in Array1
If checkbox.Value = True Then
Sheets("Template Sheet").Select
Sheets("Template Sheet").Copy After:=Sheets(1) 'Probable enumeration issue
Sheets("Template Sheet (2)").Select
Sheets("Template Sheet (2)").Name = checkbox.Caption
End If
Next
For Each checkbox in Array2
If checkbox.Value = True Then
Sheets("CheckboxCaption").Select
ActiveSheet.Range("E30").Select
ActiveCell.Value = checkbox.Caption
ActiveCell.Offset(1,0).Select
End If
Next
Please, ANY help is very appreciated. I am being pushed and my brain if fried.
For Each checkbox in Array1
If checkbox.Value = True Then
Sheets("Template Sheet").Select
Sheets("Template Sheet").Copy After:=Sheets(1) 'Probable enumeration issue
Sheets("Template Sheet (2)").Select
Sheets("Template Sheet (2)").Name = checkbox.Caption
End If
Next
For Each checkbox in Array2
If checkbox.Value = True Then
Sheets("CheckboxCaption").Select
ActiveSheet.Range("E30").Select
ActiveCell.Value = checkbox.Caption
ActiveCell.Offset(1,0).Select
End If
Next
Please, ANY help is very appreciated. I am being pushed and my brain if fried.