I am trying to compare the value in a cell to the value that I have entered into a user form text box. If the values match I am returning a vbOKOnly text box showing that the value in the text box is a duplicate of a cell on my sheet.
I have the following code:
if Sheet.Cells(Row, Column).value = InvoiceNumberTextBox.value Then
Where my Row and Column values are variables in a loop.
If the value in the cell has a letter in it (i.e. "A-123" or "A 123") everything works correctly. However, if there is not a letter in the cell value (i.e. "123") then it does not detect a match.
Any suggestions to how I should be doing this differently?
I have the following code:
if Sheet.Cells(Row, Column).value = InvoiceNumberTextBox.value Then
Where my Row and Column values are variables in a loop.
If the value in the cell has a letter in it (i.e. "A-123" or "A 123") everything works correctly. However, if there is not a letter in the cell value (i.e. "123") then it does not detect a match.
Any suggestions to how I should be doing this differently?