Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 ?", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " ?" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 ?", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " ?" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 ?", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " ?" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de news:
EF03BBF6-1C24-4E5D-A265-15BA3E73D56E@microsoft.com...
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition humaine!
Merci à tous
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aide
Bonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de
news:
EF03BBF6-1C24-4E5D-A265-15BA3E73D56E@microsoft.com...
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Re,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de news:Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Re,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de news:
42E12139-5826-4B9A-8419-F957445C6B1F@microsoft.com...
Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aide
Bonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de
news:
EF03BBF6-1C24-4E5D-A265-15BA3E73D56E@microsoft.com...
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Re,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de news:Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonjour,
Peut tu me donner un exemple au sujet de la commande Keypress et pour
forcer
la valeur du Textbox a 0 merciRe,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la
saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un
des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonjour,
Peut tu me donner un exemple au sujet de la commande Keypress et pour
forcer
la valeur du Textbox a 0 merci
Re,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la
saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de
news:
42E12139-5826-4B9A-8419-F957445C6B1F@microsoft.com...
Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aide
Bonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de
news:
EF03BBF6-1C24-4E5D-A265-15BA3E73D56E@microsoft.com...
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un
des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonjour,
Peut tu me donner un exemple au sujet de la commande Keypress et pour
forcer
la valeur du Textbox a 0 merciRe,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la
saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un
des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonjour,
Il suffit de demander ....
Voici un exemple à adapter
J'ai laissé de quoi traiter les majuscules, minuscules , espace et tiret
A mettre dans le module du usf
Private Sub txt_Code_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 20, 45, 48 To 57, 65 To 90
'espace, tiret, A , B , C et 0 ....9 OK !
Case 97 To 122
'a , b , c .... en majuscule !
KeyAscii = KeyAscii - 32
Case Else
KeyAscii = Asc(Chr(8))
MsgBox "Caractère non autorisé !"
End Select
End Sub
' et pour forcer à 0 si vide
'
Private Sub txt_Code_Change()
If Trim(txt_Code.Text) = "" Then txt_Code.Text = "0"
End Sub
Bonne journée
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de news:Bonjour,
Peut tu me donner un exemple au sujet de la commande Keypress et pour
forcer
la valeur du Textbox a 0 merciRe,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la
saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un
des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonjour,
Il suffit de demander ....
Voici un exemple à adapter
J'ai laissé de quoi traiter les majuscules, minuscules , espace et tiret
A mettre dans le module du usf
Private Sub txt_Code_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 20, 45, 48 To 57, 65 To 90
'espace, tiret, A , B , C et 0 ....9 OK !
Case 97 To 122
'a , b , c .... en majuscule !
KeyAscii = KeyAscii - 32
Case Else
KeyAscii = Asc(Chr(8))
MsgBox "Caractère non autorisé !"
End Select
End Sub
' et pour forcer à 0 si vide
'
Private Sub txt_Code_Change()
If Trim(txt_Code.Text) = "" Then txt_Code.Text = "0"
End Sub
Bonne journée
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de news:
8560A793-F9B6-48ED-BC24-195D3D384E6A@microsoft.com...
Bonjour,
Peut tu me donner un exemple au sujet de la commande Keypress et pour
forcer
la valeur du Textbox a 0 merci
Re,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la
saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de
news:
42E12139-5826-4B9A-8419-F957445C6B1F@microsoft.com...
Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aide
Bonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" <STEN83@discussions.microsoft.com> a écrit dans le message de
news:
EF03BBF6-1C24-4E5D-A265-15BA3E73D56E@microsoft.com...
Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un
des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous
Bonjour,
Il suffit de demander ....
Voici un exemple à adapter
J'ai laissé de quoi traiter les majuscules, minuscules , espace et tiret
A mettre dans le module du usf
Private Sub txt_Code_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
Select Case KeyAscii
Case 20, 45, 48 To 57, 65 To 90
'espace, tiret, A , B , C et 0 ....9 OK !
Case 97 To 122
'a , b , c .... en majuscule !
KeyAscii = KeyAscii - 32
Case Else
KeyAscii = Asc(Chr(8))
MsgBox "Caractère non autorisé !"
End Select
End Sub
' et pour forcer à 0 si vide
'
Private Sub txt_Code_Change()
If Trim(txt_Code.Text) = "" Then txt_Code.Text = "0"
End Sub
Bonne journée
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de news:Bonjour,
Peut tu me donner un exemple au sujet de la commande Keypress et pour
forcer
la valeur du Textbox a 0 merciRe,
Je crois, pour compléter le message de Patrick, qu'il faut effectivement
tester
après chaque évènement Change :
- si la valeur est vide, alors forcer à 0 la valeur du Textbox
- utiliser l'évènement KeyPress du Textbox pour n'autoriser que la
saisie
de chiffres
Si problème pour faire, demande ici
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonsoir Pounet95,
Tout d'abord merci d'avoir répondu aussi rapidement a ma question,
pour ce qu'y est du message d'erreur:
Erreur d'exécution '13'
Incomptabilité de type
Voilà merci de ton aideBonsoir,
Le code c'est bien, mais si il était possible d'avoir le libellé du
message
d'erreur,
ce serait pas mal.
Juste en lisant en diagonale, pourquoi seul le Text200 a droit à une
conversion Cdbl ?
--
Pounet95
on trouve tout ( ou presque ) http://www.excelabo.net/
"STEN83" a écrit dans le message de
news:Bonjour, j'ai un petit problème avec des textbox
Par l'intemédiaire d'un usf j'additionne des chiffre entrés dans des
textbox, mais lorsque je veux supprimer un chiffre erroné dans l'un
des
textbox il m'affiche un message d'erreur!
Voici le code de mon usf
Private Sub CmdValid_Click()
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
FPOSTE.Range("F14").Value = FDRDEBUT.TextTotal.Value
If TextTotal.Value = 200 Then
MsgBox "Fond de roulement à 200 €", vbInformation, "FDR Correct"
Unload Me
Else
MsgBox "Fond de roulement incorrect" & Chr(13) _
& "Il y a " & TextTotal.Value & " €" & Chr(13) _
& "Vous devriez recompter!", vbCritical, "FDR Incorrect"
End If
End Sub
Private Sub Textmulti01_Change()
Text01 = CDbl(Textmulti01) * 0.1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti02_Change()
Text02 = CDbl(Textmulti02) * 0.2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti05_Change()
Text05 = CDbl(Textmulti05) * 0.5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti1_Change()
Text1 = CDbl(Textmulti1) * 1
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti10_Change()
Text10 = CDbl(Textmulti10) * 10
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti100_Change()
Text100 = CDbl(Textmulti100) * 100
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti2_Change()
Text2 = CDbl(Textmulti2) * 2
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti20_Change()
Text20 = CDbl(Textmulti20) * 20
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti200_Change()
Text200 = CDbl(Textmulti200) * 200
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti5_Change()
Text5 = CDbl(Textmulti5) * 5
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub Textmulti50_Change()
Text50 = CDbl(Textmulti50) * 50
TextTotal = CDbl(Text200.Value) + (Text100.Value) + (Text50.Value) +
(Text20.Value) + (Text10.Value) + (Text5.Value) + (Text2.Value) +
(Text1.Value) + (Text05.Value) + (Text02.Value) + (Text01.Value)
End Sub
Private Sub UserForm_Activate()
Text200.Value = 0
Text100.Value = 0
Text50.Value = 0
Text20.Value = 0
Text10.Value = 0
Text5.Value = 0
Text2.Value = 0
Text1.Value = 0
Text05.Value = 0
Text02.Value = 0
Text01.Value = 0
End Sub
Merci de votre aide
--
Le partage du savoir contribue à l'amélioration de la condition
humaine!
Merci à tous