Private Sub CommandButton1_Click()
If TextBox1 = "" Then
Call Search_productnumber(TextBox2)
If TextBox2 = "" Then
Call Search_productname(TextBox1)
Else
Call Search_productname(TextBox1)
Call Search_productnumber(TextBox2)
End If
End If
End Sub
This If statement is supposed to search either textbox1 or textbox2 on a userform when the command button is clicked. I can't see what is wrong with it, could someone please help!
If TextBox1 = "" Then
Call Search_productnumber(TextBox2)
If TextBox2 = "" Then
Call Search_productname(TextBox1)
Else
Call Search_productname(TextBox1)
Call Search_productnumber(TextBox2)
End If
End If
End Sub
This If statement is supposed to search either textbox1 or textbox2 on a userform when the command button is clicked. I can't see what is wrong with it, could someone please help!