If TextAmplitude <> "" Then Me.TextEffectif = heure(Me.TextAmplitude) * Val(Replace(Me.TextCoef, ",", "."))
Private Sub TextAmplitude_Change()
If TextAmplitude = "" Then Exit Sub
If TextAmplitude <> "" Then Me.TextEffectif = heure(Me.TextAmplitude) * Val(Replace(Me.TextCoef, ",", "."))
End Sub
If TextAmplitude <> "" Then Me.TextEffectif = heure(Me.TextAmplitude) * Val(Replace(Me.TextCoef, ",",
Private Sub CommandButton1_Click()
If Not IsDate(TextAmplitude) Then TextAmplitude.SetFocus: Exit Sub
TextEffectif = heure(TextAmplitude, TextCoef)
End Sub
Function heure(str As Date, coef As String)
heure = 24 * str * Val(Replace(coef, ",", "."))
heure = Int(heure) & "," & Round(60 * (heure - Int(heure)), 2)
End Function
Private Sub CommandButton1_Click()
If Not IsDate(TextAmplitude) Then TextAmplitude.SetFocus: Exit Sub
TextEffectif = heure(TextAmplitude, TextCoef)
End Sub
Function heure(str As Date, coef As String)
heure = 24 * str * Val(Replace(coef, ",", "."))
heure = Int(heure) & ":" & Round(60 * (heure - Int(heure)), 2)
End Function
Private Sub CommandButton1_Click()
If UBound(Split(TextAmplitude, ":")) = 1 Then
TextEffectif = heure(TextAmplitude, TextCoef)
Else
TextAmplitude = ""
TextAmplitude.SetFocus
End If
End Sub
Function heure(str As String, coef As String)
heure = Val(Split(str, ":")(0)) + Val(Split(str, ":")(1)) / 60
heure = heure * Val(Replace(coef, ",", "."))
heure = Int(heure) & ":" & Format(60 * (heure - Int(heure)), "00")
End Function