MASSJIPE
XLDnaute Impliqué
Bonjour
J'ai un probleme avec la date du DTPicker il ce met pas à la date du jour, avec les autres documents ca fonctionne mais pas celui la
Merci
Private Sub cmdValider_Click()
' On teste la saisie du N°...
If Me.TextNum.Text = "" Then
MsgBox "Vous devez entrer un N°."
Me.TextNum.SetFocus
Exit Sub
End If
' On teste la saisie du Elt...
If Me.TextElt.Text = "" Then
MsgBox "Vous devez entrer un Elt."
Me.TextElt.SetFocus
Exit Sub
End If
' On teste la saisie du Inc ...
If Me.TextInc.Text = "" Then
MsgBox "Vous devez entrer un Inc."
Me.TextInc.SetFocus
Exit Sub
End If
' On teste la saisie du Ordre ...
If Me.TEXOrdre.Text = "" Then
MsgBox "Vous devez entrer un Ordre."
Me.TEXOrdre.SetFocus
Exit Sub
End If ' On teste la saisie du PJI ...
If Me.TEXPji.Text = "" Then
MsgBox "Vous devez entrer un Pji."
Me.TEXPji.SetFocus
Exit Sub
End If
Sheets("RectoalerteV1").Range("C2").Value = CDate(Format(DTPicker1, "dd/mm/yy"))
Sheets("RectoalerteV1").Range("O1").Value = Me.TextNum.Text
Sheets("RectoalerteV1").Range("c6").Value = Me.TextElt.Text
Sheets("RectoalerteV1").Range("E6").Value = Me.TextInc.Text
Sheets("RectoalerteV1").Range("H9").Value = Me.TEXOrdre.Text
Sheets("RectoalerteV1").Range("K9").Value = Me.TEXPji.Text
Sheets("RectoalerteV1").Range("D11").Value = Me.TextCSCS.Text
Sheets("RectoalerteV1").Range("G11").Value = Me.TextBdm.Text
Sheets("RectoalerteV1").Range("K11").Value = Me.TextCSCD.Text
Sheets("RectoalerteV1").Range("H13").Value = Me.TextBox2.Text
Sheets("RectoalerteV1").Range("J6").Value = Me.ComboBox1
Sheets("RectoalerteV1").Range("C9").Value = Me.ComboBox2
Sheets("RectoalerteV1").Range("E9").Value = Me.ComboBox3
Sheets("RectoalerteV1").Range("C15").Value = Me.ComboBox4
Sheets("RectoalerteV1").Range("B1").Value = Me.ComboBox5
Unload Me 'De cette façon, à la prochaine saisie, les textbox seront vides à l'ouverture
End Sub
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub saisie_Initialize()
With Sheets("Papier Alerte")
Derlign = .Range("A65000").End(xlUp).Row + 1
DTPicker1.Value = Date
End With
With Sheets("Combobox")
ComboBox1.List = .Range("Origine").Value
ComboBox2.List = .Range("TYPE").Value
ComboBox3.List = .Range("FLUX").Value
ComboBox4.List = .Range("AQM").Value
ComboBox5.List = .Range("Alerte").Value
End With
End Sub
J'ai un probleme avec la date du DTPicker il ce met pas à la date du jour, avec les autres documents ca fonctionne mais pas celui la
Merci
Private Sub cmdValider_Click()
' On teste la saisie du N°...
If Me.TextNum.Text = "" Then
MsgBox "Vous devez entrer un N°."
Me.TextNum.SetFocus
Exit Sub
End If
' On teste la saisie du Elt...
If Me.TextElt.Text = "" Then
MsgBox "Vous devez entrer un Elt."
Me.TextElt.SetFocus
Exit Sub
End If
' On teste la saisie du Inc ...
If Me.TextInc.Text = "" Then
MsgBox "Vous devez entrer un Inc."
Me.TextInc.SetFocus
Exit Sub
End If
' On teste la saisie du Ordre ...
If Me.TEXOrdre.Text = "" Then
MsgBox "Vous devez entrer un Ordre."
Me.TEXOrdre.SetFocus
Exit Sub
End If ' On teste la saisie du PJI ...
If Me.TEXPji.Text = "" Then
MsgBox "Vous devez entrer un Pji."
Me.TEXPji.SetFocus
Exit Sub
End If
Sheets("RectoalerteV1").Range("C2").Value = CDate(Format(DTPicker1, "dd/mm/yy"))
Sheets("RectoalerteV1").Range("O1").Value = Me.TextNum.Text
Sheets("RectoalerteV1").Range("c6").Value = Me.TextElt.Text
Sheets("RectoalerteV1").Range("E6").Value = Me.TextInc.Text
Sheets("RectoalerteV1").Range("H9").Value = Me.TEXOrdre.Text
Sheets("RectoalerteV1").Range("K9").Value = Me.TEXPji.Text
Sheets("RectoalerteV1").Range("D11").Value = Me.TextCSCS.Text
Sheets("RectoalerteV1").Range("G11").Value = Me.TextBdm.Text
Sheets("RectoalerteV1").Range("K11").Value = Me.TextCSCD.Text
Sheets("RectoalerteV1").Range("H13").Value = Me.TextBox2.Text
Sheets("RectoalerteV1").Range("J6").Value = Me.ComboBox1
Sheets("RectoalerteV1").Range("C9").Value = Me.ComboBox2
Sheets("RectoalerteV1").Range("E9").Value = Me.ComboBox3
Sheets("RectoalerteV1").Range("C15").Value = Me.ComboBox4
Sheets("RectoalerteV1").Range("B1").Value = Me.ComboBox5
Unload Me 'De cette façon, à la prochaine saisie, les textbox seront vides à l'ouverture
End Sub
Private Sub CommandButton1_Click()
Unload Me
End Sub
Private Sub saisie_Initialize()
With Sheets("Papier Alerte")
Derlign = .Range("A65000").End(xlUp).Row + 1
DTPicker1.Value = Date
End With
With Sheets("Combobox")
ComboBox1.List = .Range("Origine").Value
ComboBox2.List = .Range("TYPE").Value
ComboBox3.List = .Range("FLUX").Value
ComboBox4.List = .Range("AQM").Value
ComboBox5.List = .Range("Alerte").Value
End With
End Sub