Hi,
In Holland (and other countries ofcourse) we use the "," to seperate the decimals in stead of the "." (1.000,00)
Have me a textbox where users can add a value using the ",". Now they want to use the "." to have the same "value" as the ","
Example: When I type 10.0 then it should be 10,0
In Excel-VBA I had this code to do so in a UserForm, ofcourse this does not work in VB.
Private Sub tbMaand_KeyUp( _
ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Dim strCompare As String
On Error Resume Next
If tbMonth = vbNullString Then Exit Sub
strCompare = tbMonth.Value
If KeyCode = 110 Or KeyCode = 190 Then
strCompare = Left(strCompare, Len(strCompare) - 1) & International(xlDecimalSeperator)
tbMaand.Value = strCompare
End If
End Sub
Does someone know how to do this? Searched the net without result. Please be patient.. newbee.
---------------------------------------
This will be the day when all of God’s children will be able to sing with a new meaning, “My country, ‘tis of thee, sweet land of liberty, of thee I sing. Land where my fathers died, land of the pilgrim’s pride, from every mountainside, let freedom ring. - Marten Luther King
In Holland (and other countries ofcourse) we use the "," to seperate the decimals in stead of the "." (1.000,00)
Have me a textbox where users can add a value using the ",". Now they want to use the "." to have the same "value" as the ","
Example: When I type 10.0 then it should be 10,0
In Excel-VBA I had this code to do so in a UserForm, ofcourse this does not work in VB.
Private Sub tbMaand_KeyUp( _
ByVal KeyCode As MSForms.ReturnInteger, _
ByVal Shift As Integer)
Dim strCompare As String
On Error Resume Next
If tbMonth = vbNullString Then Exit Sub
strCompare = tbMonth.Value
If KeyCode = 110 Or KeyCode = 190 Then
strCompare = Left(strCompare, Len(strCompare) - 1) & International(xlDecimalSeperator)
tbMaand.Value = strCompare
End If
End Sub
Does someone know how to do this? Searched the net without result. Please be patient.. newbee.
---------------------------------------
This will be the day when all of God’s children will be able to sing with a new meaning, “My country, ‘tis of thee, sweet land of liberty, of thee I sing. Land where my fathers died, land of the pilgrim’s pride, from every mountainside, let freedom ring. - Marten Luther King