1
How can i get my IF function to return a error message if NO number has been entered into cell C4. My code below run if you enter a number but it also runs if Cell C4 is empty, only when i enter text into the cell it comes up with the error message.
Private Sub CommandButton1_Click()
If IsNumeric(Range("C4")) = True Then
FinishClear
Else
MsgBox "Please enter Invoice number"
End If
End Sub
Sheets("InvoiceList").Activate - opens a sheet myRow = Cells(Rows.Count, "A").End(xlUp).Row + 1 - finds the next availble number in sequence and adds 1 on for next invoice number. – jase8888 – 2017-06-13T09:44:45.390
then the rest of the code copies data on the invoice worksheet to invoicelist worksheet. Im not asking for someone to do my work im asking if someone knows what i should be doing to validate this. As in if it doesnt have txt in Cell, C4, C5, C8, etc display "missing text" and not to send the data to Invoicelist – jase8888 – 2017-06-13T09:47:35.190
Yeah ive got it working with If IsNumeric(Range("C4")) = True Then.....and it puts the code above in and works but if the cell is empty it should display a msgbox saying no invoice number - the issue is if Cell C4 is blank it thinks its a number and works which i dont want. – jase8888 – 2017-06-13T10:23:51.917
Please edit your post and include this information As it shows what you've tried. I will then help to fix it – Dave – 2017-06-13T10:31:18.217
ok thanks - ive changed the question to explain my issue better i think.... – jase8888 – 2017-06-13T12:44:05.787