Salve a tutti!
Volevo creare una sub che fomatta il valore contenuto in una text, allora ho scritto quanto segue:
Private Sub txtImponibile_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtImponibile.TextChanged
FormattaTextImporti(txtImponibile.Text, txtImponibile)
End Sub
Private Sub FormattaTextImporti(ByVal ValoreImporto As Decimal, ByRef txtNome As TextBox)
Dim ris As Decimal
ris = CDec(ValoreImporto)
txtNome.Text = Format(ris, "##,##0.#0")
End Sub
Oltre al valore volevo passare il nome della text, ma ho dei dubbi su ByVal e ByRef
mi date un consiglio??
Grazie a tutti in anticipo!!!!!!