Bonjour,
j'ai réussi à résoudre mon problème. le code ci-dessous :
Option Explicit
Dim pos As Integer
Private Sub form_load()
Dim A As Single
A = 1234.5678
'pour attribuer une valeur au TextBox avec seulement 2 décimales
TextBox4 = Format(A, "#0.00")
TextBox8 = Format(A, "#0.00")
End Sub
Private Sub CommandButton1_Click()
UserForm1.Hide
End Sub
Private Sub textbox4_change()
Dim A As Single
A = Feuil4.Range("N10")
TextBox4 = Format(A, "#0.00")
End Sub
Private Sub textbox8_change()
Dim A As Single
A = Feuil4.Range("R10")
TextBox8 = Format(A, "#0.00")
End Sub
j'obtien au final 2016-11-29_101701.png en pièce jointe.
avant le code j'avais 2016-11-29-083423.png en pièce jointe