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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
| oExcel = CreateObject("Excel.Application")
oBook = oExcel.Workbooks.Add
oSheet = oExcel.ActiveSheet
With oExcel.Sheets("Feuil1")
i = oExcel.WorksheetFunction.CountA(oExcel.Worksheets("feuil1").Columns(1))
i = i + 1.0
' demandeur
.Cells(i, 1).Value = "DEMANDEUR"
'noms ITC
.Cells(i, 2).Value = "NOMS ITC"
' date
.Cells(i, 3).Value = "DATE"
' temps passée
.Cells(i, 4).Value = "TEMPS"
' client
.Cells(i, 5).Value = "CLIENT"
' contact client
.Cells(i, 6).Value = "CONTACT"
' N° SOON
.Cells(i, 7).Value = "N° SOON"
' code agence
.Cells(i, 8).Value = "CODE AGENCE"
'noms DEPARTEMENT
.Cells(i, 9).Value = "DEPARTEMENT"
' famille
.Cells(i, 10).Value = "FAMILLE"
'Questions
.Cells(i, 11).Value = "QUESTIONS"
'Réponse
.Cells(i, 12).Value = "REPONSE"
'email
.Cells(i, 13).Value = "Email Demandeur"
'action
.Cells(i, 14).Value = "Action Commerciale ?"
'telephone
.Cells(i, 15).Value = "Tel Client"
i = i + 1
' demandeur
.Cells(i, 1).Numberformat = "@" 'Cellules au format texte
.Cells(i, 1).Value = TextBox3.Text
'noms ITC
.Cells(i, 2).Numberformat = "@" 'Cellules au format texte
.Cells(i, 2).Value = mesinfos.TextBox2.Text
' date
.Cells(i, 3).Value = DateTimePicker1.Text
' Temps passée
.Cells(i, 4).Value = ComboBox4.Text
' client
.Cells(i, 5).Numberformat = "@" 'Cellules au format texte
.Cells(i, 5).Value = TextBox1.Text
' contact client
.Cells(i, 6).Numberformat = "@" 'Cellules au format texte
.Cells(i, 6).Value = TextBox2.Text
' N° SOON
.Cells(i, 7).Value = TextBox4.Text
' code agence
.Cells(i, 8).Value = TextBox7.Text
'noms DEPARTEMENT
.Cells(i, 9).Numberformat = "@" 'Cellules au format texte
.Cells(i, 9).Value = ComboBox2.Text
' famille
.Cells(i, 10).Numberformat = "@" 'Cellules au format texte
.Cells(i, 10).Value = ComboBox3.Text
'Questions
.Cells(i, 11) = Replace(TextBox6.Text, Chr(13) & Chr(10), " ")
'Réponse
.Cells(i, 12) = Replace(TextBox8.Text, Chr(13) & Chr(10), " ")
'email
.Cells(i, 13).Numberformat = "@" 'Cellules au format texte
.Cells(i, 13).Value = TextBox9.Text
'action
.Cells(i, 14).Value = TextBox10.Text
'téléphone
'appel du module pour espace tel.
telephone = TextBox14.Text
ESPACE.espace(telephone, TextBox14.Text)
System.Windows.Forms.Application.DoEvents()
.Cells(i, 15).Numberformat = "@" 'Cellules au format texte
.Cells(i, 15).Value = TextBox14.Text
.name = "suivi" ' renomage de l'onglet
'autoajustage des colonnes
.Cells.Columns.AutoFit()
End With
With oExcel.Sheets("Feuil2")
i = oExcel.WorksheetFunction.CountA(oExcel.Worksheets("Feuil2").Columns(1))
i = i + 1.0
'creation nombre de demande incorrect
.Cells(i, 1).Value = "Demande Hotline incorrect"
' demandeur
.Cells(i, 2).Value = "DEMANDEUR"
'noms ITC
.Cells(i, 3).Value = "NOMS ITC"
' date
.Cells(i, 4).Value = "DATE"
.name = "demande incorrecte"
'autoajustage des colonnes
.Cells.Columns.AutoFit()
End With
With oExcel.Sheets("Feuil3")
i = oExcel.WorksheetFunction.CountA(oExcel.Worksheets("feuil3").Columns(1))
i = i + 1.0
' demandeur
.Cells(i, 1).Value = "DEMANDEUR"
'noms ITC
.Cells(i, 2).Value = "NOMS ITC"
' date
.Cells(i, 3).Value = "DATE"
' temps passée
.Cells(i, 4).Value = "TEMPS"
' client
.Cells(i, 5).Value = "CLIENT"
' contact client
.Cells(i, 6).Value = "CONTACT"
' N° DEVIS
.Cells(i, 7).Value = "N°DEVIS"
' MONTANT
.Cells(i, 8).Value = "MONTANT"
'noms DEPARTEMENT
.Cells(i, 9).Value = "DEPARTEMENT"
' famille
.Cells(i, 10).Value = "FAMILLE"
'Descriptif
.Cells(i, 11).Value = "DESCRIPTIF"
'telephone
.Cells(i, 12).Value = "Tel Client"
'implication avv
.Cells(i, 13).Value = "AVV Client"
'implication Définiton Produits
.Cells(i, 14).Value = "Définiton Produits"
'Validation Produits
.Cells(i, 15).Value = "Validation Produits"
'Relance Affaire
.Cells(i, 16).Value = "Suivi Affaire"
'Saisie Soon
.Cells(i, 17).Value = "Saisie Soon"
'Réserve
.Cells(i, 18).Value = "Traitement Solo"
.name = "suivi affaire" ' renomage de l'onglet
'autoajustage des colonnes
.Cells.Columns.AutoFit()
'fermeture des instances Excel
oExcel.DisplayAlerts = False
oBook.Saveas(Filename:=nom_fichier, 8Oc'est ici le problème8O)
oBook.close(Filename:=nom_fichier & ".xls")
oExcel.Quit()
oExcel.DisplayAlerts = True
oSheet = Nothing
oExcel = Nothing
oBook = Nothing |
Partager