litestream
Active Member
- Joined
- Jul 24, 2006
- Messages
- 323
I have a user form with 4 check boxes - one for each of 4 areas on the same worksheet. When I check a box and press the command button, one of the 4 areas is printed.
I'd like to be able to add the areas (for example, checking boxes 1 and 3 would result in the ranges a3:c18 and a21:c36 being printed on the same page.
Here is the code I am using:
Any assistance would be greatly appreciated
I'd like to be able to add the areas (for example, checking boxes 1 and 3 would result in the ranges a3:c18 and a21:c36 being printed on the same page.
Here is the code I am using:
Code:
Private Sub CommandButton1_Click()
If CheckBox1.Value = True Then
Sheets("MON").Range("a3:c18").PrintOut
End If
If CheckBox2.Value = True Then
Sheets("MON").Range("e3:g18").PrintOut
End If
If CheckBox3.Value = True Then
Sheets("MON").Range("a21:c36").PrintOut
End If
If CheckBox4.Value = True Then
Sheets("MON").Range("e21:g36").PrintOut
End If
UserForm1.Hide
End Sub
Any assistance would be greatly appreciated