Dim Data As String
Data = cstr(cdbl(10)) '// double converted to string
debug.print IsFloat(Data) '// return False
Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.
TRUSTED BY
And forcing users to input the format you expect is not an option (users should not adapt to you).
At best, you can use the IsNumeric function (beware that it is subject to local settings), or use a regular expression:
^0*[1-9]\d*(?:[.,]\d+[1-9])?$ Check for numeric with a point or a coma as decimal separator
^0*[1-9]\d*(?:\.\d+[1-9])?$ Check for numeric with a point as decimal separator
^0*[1-9]\d*(?:,\d+[1-9])?$ Check for numeric with a coma as decimal separator