While on the subject of userforms; I have a problem with a userform where the user is asked to enter a decimal value in one of the fields. The problem is that this 'application' is to be used by different users who have their default decimal settings on their PC both as , (comma) and . (stop). Somehow this messes up as VBA in some situations will not understand the decimal point that is entered as exactly that.

How can I easily check the value for which type of decimal point that is entered and change that to . ?

I have for the moment solved it like this when the user clicks the OK button to close the userform:



Private Sub OKButton_Click() 
Interval= Userform.Interval.Value
If Not IsNumeric(Interval) Then
MsgBox ("Interval does not contain numeric value")
Else
Userform.Hide
End If
End Sub


What I think I need to do is to use Search..Replace to search the variable Interval for the , and replace it with a .

I know it must be easy but after a long day at work my head just doesn't seem to work..

Johannes