Code:
If CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True And CheckBox6.Value = True And CheckBox7.Value = True And CheckBox8.Value = True And CheckBox9.Value = True And CheckBox10.Value = True And CheckBox11.Value = True And CheckBox12.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std"), Range("feb_std"), Range("mar_std"), Range("apr_std"), Range("may_std"), Range("jun_std"), Range("jul_std"), Range("aug_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True And CheckBox6.Value = True And CheckBox7.Value = True And CheckBox8.Value = True And CheckBox9.Value = True And CheckBox10.Value = True And CheckBox11.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std"), Range("feb_std"), Range("mar_std"), Range("apr_std"), Range("may_std"), Range("jun_std"), Range("jul_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True And CheckBox6.Value = True And CheckBox7.Value = True And CheckBox8.Value = True And CheckBox9.Value = True And CheckBox10.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std"), Range("feb_std"), Range("mar_std"), Range("apr_std"), Range("may_std"), Range("jun_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True And CheckBox6.Value = True And CheckBox7.Value = True And CheckBox8.Value = True And CheckBox9.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std"), Range("feb_std"), Range("mar_std"), Range("apr_std"), Range("may_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True And CheckBox6.Value = True And CheckBox7.Value = True And CheckBox8.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std"), Range("feb_std"), Range("mar_std"), Range("apr_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True And CheckBox6.Value = True And CheckBox7.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std"), Range("feb_std"), Range("mar_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True And CheckBox6.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std"), Range("feb_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True And CheckBox5.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std"), Range("jan_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True And CheckBox4.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std"), Range("dec_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True And CheckBox3.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std"), Range("nov_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True And CheckBox2.Value = True Then
Worksheets("Schedule").Activate
Union(Range("sep_std"), Range("oct_std")).Select
Selection.ClearContents
ElseIf CheckBox1.Value = True Then
Worksheets("Schedule").Activate
Range("sep_std").Select
Selection.ClearContents
End If
This has worked but it partially did what I wanted. Meaning that if the months were selected sequentially it would have no problem.
Bookmarks