Testing for a currency ..

  • Thread starter Thread starter Mark Rosenkrantz
  • Start date Start date
M

Mark Rosenkrantz

Dear members;

I have auserform with textbox in which amounts have to be entered.
I want to test for correct input.

My question is how do I do that.
Is there something like : Isdate, but then for currencies ??

Thanks in advance.

Mark.
 
Nothing built in so here's a suggestion:

Function IsCurrency(ByVal Expression As Variant) As Boolean
Dim curTest As Currency
On Error Resume Next
curTest = CCur(Expression)
IsCurrency = (Err.Number = 0)
On Error GoTo 0
End Function
 
Thanks;

I'll try that.

Mark.

onedaywhen said:
Nothing built in so here's a suggestion:

Function IsCurrency(ByVal Expression As Variant) As Boolean
Dim curTest As Currency
On Error Resume Next
curTest = CCur(Expression)
IsCurrency = (Err.Number = 0)
On Error GoTo 0
End Function

"Mark Rosenkrantz" <[email protected]> wrote in message
 
Back
Top