1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
| numero = ""
numero = ActiveCell.Row
'verifie si affaire pas close
If Range("i" & numero).Value = "" Then
Else
MsgBox ("Cet écart est clos, vous ne pouvez faire de relance"), vbCritical, "RELANCE"
Sheets("PARAMETRES").Activate
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Sheets("LISTE").Activate
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
Exit Sub
End If
osr = ""
prestataire = ""
typ = ""
description = ""
datr = ""
descriptionr = ""
dat1mail = ""
osr = Cells(numero, 1).Value
prestataire = Cells(numero, 2).Value
typ = Cells(numero, 3).Value
description = Cells(numero, 4).Value
dat = Cells(numero, 5).Value
dat1mail = Cells(numero, 6).Value
datr = Cells(numero, 7).Value
descriptionr = Cells(numero, 8).Value
If Cells(numero, 6).Value = "" Then echange = "sans email" Else echange = "avec email"
Load UserForm2
UserForm2.hosr.Value = osr
UserForm2.hprestataire.Value = prestataire
UserForm2.htype.Value = typ
UserForm2.hdate.Value = dat
UserForm2.hdescription.Value = description
If dat1mail = "" Then UserForm2.datemail1.Value = "PAS DE MAIL ENVOYE" Else UserForm2.datemail1.Value = dat1mail
UserForm2.hdrelance.Value = datr
UserForm2.hmessages.Value = descriptionr
If typ = "REFUS ETUDE" Then UserForm2.echang.Visible = False
If echange = "avec email" Then UserForm2.echang.Visible = False
UserForm2.Show
End Sub
Sub suite_relance()
message = UserForm2.message.Value
If typ = "REFUS ETUDE" Then
Else
If echange = "sans email" Then
If UserForm2.echangoui Then
echange = "echange avec email"
Else
'test si donnée rempli
If UserForm2.echangnon Then
Else
MsgBox "Vous n'avez pas répondu à la question concernant l'échange", vbCritical, "ALERTE RELANCE"
Exit Sub
End If
End If
End If
End If
'test si donnée rempli
If message = "" Then
MsgBox "Vous n'avez pas saisi de COMMENTAIRES", vbCritical, "ALERTE RELANCE"
Exit Sub
End If
Unload UserForm2
textechange = ""
'remplir la feuille LISTE
Sheets("LISTE").Activate
If echange = "echange avec email" Then Cells(numero, 6).Value = Range("k2").Value
If datr = "" Then Cells(numero, 7).Value = Date Else Cells(numero, 7).Value = datr & " - " & Date
If descriptionr = "" Then Cells(numero, 8).Value = message Else Cells(numero, 8).Value = descriptionr & " - " & message
Cells(numero, 10).Value = Date
Cells(numero, 11).Value = Cells(numero, 11).Value + 1 |
Partager