PuntoVirgola




'Inserire in un modulo bas:

'*******************

Public Function TrovaDecimali(str As String) As String
Dim i As Integer
Dim TempDec As String
str = Format$(str, "#,###0,000")
For i = 1 To Len(str)
If Mid$(str, i, 1) = "," Then
TempDec = TempDec & "."
Else
TempDec = TempDec & Mid$(str, i, 1)
End If
Next i
TrovaDecimali = TempDec
End Function

'*******************

'In una form inserire una textbox chiamata Text1, una textbox

'chiamata Text2 ed un commandbutton chiamato Command1.

'Nell'evento click del commandbutton scrivere:

'*******************

Text1 = TrovaDecimali(Val(Text2))
'*******************

'Ed ecco che nella prima textbox verra' formattata la cifra

'della seconda textbox utilizzando il punto come separatore

'delle migliaia.











( puntovirgola.html )- by Paolo Puglisi - Modifica del 17/12/2023