hi experts
I hope some body fixing my codes I have two checkboxes when I check 1 it adds only from row2 in column e and if I checkbox2 it replaces the value in row2 in column e it should add in row3,4...and so on
I hope some body fixing my codes I have two checkboxes when I check 1 it adds only from row2 in column e and if I checkbox2 it replaces the value in row2 in column e it should add in row3,4...and so on
VBA Code:
Private Sub CheckBox1_Click()
Dim lr As Integer
lr = Range("a" & Rows.Count).End(xlUp).Row + 1
If CheckBox1.Value = True Then
CheckBox2.Value = False
Range("k1").Value = Range("k1").Value + 1
Range("e" & lr) = "paid invoice" & Range("k1").Value
End If
End Sub
Private Sub CheckBox2_Click()
Dim lr1 As Integer
lr1 = Range("a" & Rows.Count).End(xlUp).Row + 1
If CheckBox2.Value = True Then
CheckBox1.Value = False
Range("k2").Value = Range("k2").Value + 1
Range("e" & lr1) = "unpaid invoice" & Range("k2").Value
End If
End Sub