does textbox contain a number

  • Thread starter Thread starter Spencer Hutton
  • Start date Start date
S

Spencer Hutton

i need a statement that can evaluate whether or not a text box's value/text
is a number or not?
TIA
 
Spencer,

You can use the IsNumeric function to test whether a text string
is numeric.E.g.,

If IsNumeric(Me.TextBox1.Text) = True Then
' is a number
Else
' not a number
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top