Hi,
Im using the following code to stop errors I was getting when textbox data was blank. I call it from the text box part of the code before the calculation im doing.

Public Function CheckText(MyText As String) As Boolean
'function returns True if text is OK else returns False

If MyText = "" Then
CheckText = False
Exit Function
End If


If Not IsNumeric(MyText) Then
CheckText = False
Exit Function
End If

'If we get to here, MyText is a number
' So set function to true

CheckText = True

End Function

this works great with whole numbers but one of the boxes I'm using requires a decimal place and this still lets it cause an error. Is there anything I can use similar that will also check for decimal numbers.

Thanks, Scott

btw This forum is great, I got a super quick answer last time. I'm learning more here than in nearly all the tutorials and books ive read. Much more practical info. Thanks all.