I entered your code but got a syntax error on this line of code
controls(choose(j,"cboCategory","txtProduct","cboUnit","txtPrice","txtLabour").Value = ""
Private Sub cmdAdd_Click()
Sheets(1).Cells(Rows.Count, 1).End(xlUp).Offset(1).Resize = Array(txtProduct.Value, cboUnit.Value, txtPrice.Value, txtLabour.Value)
For j = 1 To 4
controls(choose(j,"cboCategory","txtProduct","cboUnit","txtPrice","txtLabour").Value = ""
Next
End Sub
Private Sub A_check()
cmdAdd.Visible = cboCategory.Value <> "" And txtProduct.Text <> "" And cboCategory.Value <> ""
End Sub
Private Sub txtProduct_Change()
A_check
End Sub
Private Sub cboCategory_Change()
A_check
End Sub
Bookmarks