Private Sub ComboBox1_Change()
Dim I As Long, lastrow As Long
Me.CommandButton1.Visible = True
lastrow = Sheets("Sheet1").Range("B" & Rows.Count).End(xlUp).Row
For I = 2 To lastrow
If Sheets("Sheet1").Cells(I, "A").Value = Me.ComboBox1 Or _
Sheets("Sheet1").Cells(I, "A").Value = Val(Me.ComboBox1) Then
Me.cstxt = Sheets("Sheet1").Cells(I, "D").Value
End If
If UCase(Me.cstxt.Text) = "SOLD" Then
Me.CommandButton1.Visible = False
End If
Next
End Sub