Private Sub CheckBox1_Change()
z = 1
If CheckBox1 = True Then
Do While Not Worksheets("Generated order").Cells(z, 1) = vbNullString
z = z + 1
Loop
Worksheets("Generated order").Cells(z, 1) = Cells(4, 1)
End If
z = 1
If CheckBox1 = False Then
Do While Not Cells(4, 1) = Worksheets("Generated order").Cells(z, 1)
z = z + 1
Loop
Worksheets("Generated order").Rows(z).Delete
End If
End Sub
Private Sub CheckBox2_Change()
z = 1
If CheckBox2 = True Then
Do While Not Worksheets("Generated order").Cells(z, 1) = vbNullString
z = z + 1
Loop
Worksheets("Generated order").Cells(z, 1) = Cells(5, 1)
End If
z = 1
If CheckBox2 = False Then
Do While Not Cells(5, 1) = Worksheets("Generated order").Cells(z, 1)
z = z + 1
Loop
Worksheets("Generated order").Rows(z).Delete
End If
End Sub
Private Sub CheckBox3_Change()
z = 1
If CheckBox3 = True Then
Do While Not Worksheets("Generated order").Cells(z, 1) = vbNullString
z = z + 1
Loop
Worksheets("Generated order").Cells(z, 1) = Cells(6, 1)
End If
z = 1
If CheckBox3 = False Then
Do While Not Cells(6, 1) = Worksheets("Generated order").Cells(z, 1)
z = z + 1
Loop
Worksheets("Generated order").Rows(z).Delete
End If
End Sub
Heya,
Wondering if a guy was going to have a list of say, 1k or so worth of checkboxes, with incremental code such as this, if there's a way to simply write one section which states kinda - for each checkbox, do this with the corresponding row... Since otherwise I'd need 10k work of lines of code, which makes me assume there's a way around this.
mew!
Bookmarks