Puoi usare la funzione Format.
Ad esempio:
Il primo risultato è 0,000583codice:Private Sub Command1_Click() Text1.Text = Format(7 / 12000, "###0.000000") 'Text1.Text = Format(7 / 12000, "###0.000") End Sub
Mentre il secondo con 3 decimali è 0,001
La funzione arrotonda automaticamente per eccesso e per difetto l'ultima cifra decimale.
![]()

Rispondi quotando