2 years ago

#65065

test-img

MarkuS_AureliuS

Change . to , decimal number userform entry on vba

I have a create a Userform VBA EXCEL asking an Exchange Rare value, the entry comes (for example) 1.25, but Excel don't recognized as number. So as soon as I tried a calculation on new cell, the error comes as #VALUE!" How can I change this "Text" into Value. My code below.

Private Sub Exchange_Rate_Exit(ByVal KeyAscii As MSForms.ReturnBoolean)

    If Not IsNumeric(Exchange_Rate.Value) Then
        MsgBox "Only DECIMAL NUMBER VALUES allowed"
        Cancel = True
    End If
    
    Sheets("Menu").Range("EXC_RAT") = Exchange_Rate

End Sub

excel

vba

decimal

userform

0 Answers

Your Answer

Accepted video resources