1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| Private Sub CommandButton2_Click()
If CheckBox1 = True Then Range("A1:J21").Select
If CheckBox2 = True Then Range("A22:J42").Select
If CheckBox3 = True Then Range("A43:J63").Select
If CheckBox4 = True Then Range("A64:J84").Select
If CheckBox5 = True Then Range("A85:J105").Select
If CheckBox1 And CheckBox2 = True Then Range("A1:J21,A22:J42").Select
If CheckBox1 And CheckBox3 = True Then Range("A1:J21,A43:J63").Select
If CheckBox1 And CheckBox4 = True Then Range("A1:J21,A64:J84").Select
If CheckBox1 And CheckBox5 = True Then Range("A1:J21,A85:J105").Select
If CheckBox2 And CheckBox3 = True Then Range("A22:J42,A43:J63").Select
If CheckBox2 And CheckBox4 = True Then Range("A22:J42,A64:J84").Select
If CheckBox2 And CheckBox5 = True Then Range("A22:J42,A85:J105").Select
If CheckBox3 And CheckBox4 = True Then Range("A43:J63,A64:J84").Select
If CheckBox3 And CheckBox5 = True Then Range("A43:J63,A85:J105").Select
If CheckBox4 And CheckBox5 = True Then Range("A64:J84,A85:J105").Select
If CheckBox1 And CheckBox2 And CheckBox3 = True Then Range("A1:J21,A22:J42,A43:J63").Select
If CheckBox1 And CheckBox2 And CheckBox4 = True Then Range("A1:J21,A22:J42,A64:J84").Select
If CheckBox1 And CheckBox2 And CheckBox5 = True Then Range("A1:J21,A22:J42,A85:J105").Select
If CheckBox1 And CheckBox3 And CheckBox4 = True Then Range("A1:J21,A43:J63,A64:J84").Select
If CheckBox1 And CheckBox3 And CheckBox5 = True Then Range("A1:J21,A43:J63,A85:J105").Select
If CheckBox1 And CheckBox4 And CheckBox5 = True Then Range("A1:J21,A64:J84,A85:J105").Select
If CheckBox2 And CheckBox3 And CheckBox4 = True Then Range("A22:J42,A43:J63,A64:J84").Select
If CheckBox2 And CheckBox3 And CheckBox5 = True Then Range("A22:J42,A43:J63,A85:J105").Select
If CheckBox2 And CheckBox4 And CheckBox5 = True Then Range("A22:J42,A64:J84,A85:J105").Select
If CheckBox3 And CheckBox4 And CheckBox5 = True Then Range("A43:J63,A64:J84,A85:J105").Select
If CheckBox1 And CheckBox2 And CheckBox3 And CheckBox4 = True Then Range("A1:J21,A22:J42,A43:J63,A64:J84").Select
If CheckBox1 And CheckBox2 And CheckBox3 And CheckBox5 = True Then Range("A1:J21,A22:J42,A43:J63,A85:J105").Select
If CheckBox1 And CheckBox2 And CheckBox4 And CheckBox5 = True Then Range("A1:J21,A22:J42,A64:J84,A85:J105").Select
If CheckBox1 And CheckBox3 And CheckBox4 And CheckBox5 = True Then Range("A1:J21,A43:J63,A64:J84,A85:J105").Select
If CheckBox2 And CheckBox3 And CheckBox4 And CheckBox5 = True Then Range("A22:J42,A43:J63,A64:J84,A85:J105").Select
If CheckBox1 And CheckBox2 And CheckBox3 And CheckBox4 And CheckBox5 = True Then Range("A1:J21,A22:J42,A43:J63,A64:J84,A85:J105").Select
End Sub |
Partager