Re : userform
Voila le code
Private Sub Annuler_Click()
param.Hide
End Sub
Private Sub dech_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If dech <> "" Then
If Not IsNumeric(dech) Then
rep = MsgBox("Pas de texte svp!", vbOKOnly + vbExclamation, "ATTENTION")
dech = ""
ElseIf Val(dech) < 0 Then
rep = MsgBox("Le temps de déchargement ne peut pas être négatifs !", vbOKOnly + vbExclamation, "ATTENTION")
dech = ""
End If
End If
End Sub
Private Sub marg_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If marg <> "" Then
If Not IsNumeric(marg) Then
rep = MsgBox("Pas de texte svp!", vbOKOnly + vbExclamation, "ATTENTION")
marg = ""
ElseIf Val(marg) < 0 Then
rep = MsgBox("Le temps de déchargement ne peut pas être négatifs !", vbOKOnly + vbExclamation, "ATTENTION")
marg = ""
End If
End If
End Sub
Private Sub OK_Click()
Range("H_dech") = Val(dech) / 24
Range("Marge") = Val(marg) / 24
Range("Retour_WareH") = Val(retour) / 24
param.Hide
End Sub
Private Sub retour_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If retour <> "" Then
If Not IsNumeric(retour) Then
rep = MsgBox("Pas de texte svp!", vbOKOnly + vbExclamation, "ATTENTION")
retour = ""
ElseIf Val(retour) < 0 Then '
rep = MsgBox("Le temps de déchargement ne peut pas être négatifs !", vbOKOnly + vbExclamation, "ATTENTION")
retour = ""
End If
End If
End Sub
Private Sub UserForm_Activate()
dech = ""
retour = ""
marg = ""
dech.SetFocus
End Sub
Je veux juste que quand j'entre une donnée avec décimale dans mon userform quand je clique sur OK ça me la reporte dans Excel je comprend pas pourquoi les décimales veulent pas apparaitre...🙁