Re: I know, it will be a stupid question, however...
thanks for replies
@Logophobic:
Yes, exactly. The sign of comma in my Country it's using as separate at decimals. And because I want to use the function Val then I have to exchange for calculations the sign of comma on sign the dot.
tamgovb
Last edited by Tamgovb; Jun 12th, 2007 at 05:10 PM.
Re: I know, it will be a stupid question, however...
What about something like:
Code:
Private Sub Command1_Click()
Dim Index As Integer
Label1.Caption = _
Val(Replace(Replace( _
(Replace(Text1(Index).Text, ",", "|") _
), ".", "") _
, "|", "."))
End Sub
So an example could be from 33.333,25 = 33333.25
Is that what you're looking for?
If you find any of my posts of good help, please rate it
Re: I know, it will be a stupid question, however...
I meant the return value for Val() in your procedure. Because in your original procedure if you have 33.333,25 you would end up with 33.333 and I thought you might want something different.
Anyways, for the rest of your question I would just go with gavio's suggestion:
Code:
Private Sub Command1_Click()
Dim Index As Integer
For Index = 0 To (Text1.Count - 1)
Text1(Index).Text = _
Val(Replace(Replace( _
(Replace(Text1(Index).Text, ",", "|") _
), ".", "") _
, "|", "."))
Next Index
End Sub
If you find any of my posts of good help, please rate it