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 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662
| '********************************
'Procedure permettant de fermer le formulaire de saisie
'********************************
'********************************
Private Sub CheckBox10_Click()
If CheckBox10.Value = True Then 'si coché....
Range("V2") = " 1 "
Else 'si non coché...
Range("V2") = ""
End If
End Sub
Private Sub CheckBox11_Click()
If CheckBox11.Value = True Then 'si coché....
Range("U2") = " 1 "
Else 'si non coché...
Range("U2") = ""
End If
End Sub
Private Sub CheckBox6_Click()
[Y2] = TextBox23
End Sub
Private Sub ComboBox1_Change()
End Sub
Private Sub ComboBox10_Change()
End Sub
Private Sub ComboBox4_Change()
End Sub
Private Sub ComboBox5_Change()
[N2] = ComboBox5
End Sub
Private Sub ComboBox6_Change()
[O2] = ComboBox6
End Sub
Private Sub ComboBox7_Change()
End Sub
Private Sub ComboBox8_Change()
'Pour la liste d?roulante Code contact prospect
Dim Ligne As Long
Dim I As Integer
If Me.ComboBox1.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox1.ListIndex + 2
ComboBox2 = Ws.Cells(Ligne, "B")
For I = 1 To 26
Me.Controls("TextBox" & I) = Ws.Cells(Ligne, I + 2)
Next I
End Sub
Private Sub ComboBox9_Change()
'Pour la liste d?roulante Code client
Dim Ligne As Long
Dim I As Integer
If Me.ComboBox2.ListIndex = -1 Then Exit Sub
Ligne = Me.ComboBox2.ListIndex + 2
ComboBox2 = Ws.Cells(Ligne, "B")
For I = 1 To 26
Me.Controls("TextBox" & I) = Ws.Cells(Ligne, I + 2)
Next I
End Sub
'************************************
'code ouvrir la fiche prospects
'************************************
Private Sub CommandButton1_Click()
Dim no_Ligne As Integer
no_Ligne = ComboBox1.ListIndex + 2
ComboBox8.Value = Cells(no - Ligne, 1)
ComboBox4.Value = Cells(no - Ligne, 2)
TextBox1.Value = Cells(no_Ligne, 3)
TextBox2.Value = Cells(no_Ligne, 4)
TextBox3.Value = Cells(no_Ligne, 5)
TextBox4.Value = Cells(no_Ligne, 6)
TextBox5.Value = Cells(no_Ligne, 7)
TextBox6.Value = Cells(no_Ligne, 8)
TextBox7.Value = Cells(no_Ligne, 9)
TextBox8.Value = Cells(no_Ligne, 10)
TextBox9.Value = Cells(no_Ligne, 11)
TextBox10.Value = Cells(no_Ligne, 12)
TextBox11.Value = Cells(no_Ligne, 13)
End Sub
'***********************************
'selection du fichier
'**************************************
Private Sub CommandButton10_Click()
Sheets("Prospects").Select
End Sub
'***********************************
'selection du fichier
'**************************************
Private Sub CommandButton11_Click()
Sheets("Relance").Select
End Sub
'***********************************
'selection du fichier
'**************************************
Private Sub CommandButton12_Click()
Sheets("Client").Select
MsgBox (" Bonjour Fati!")
End Sub
Private Sub CommandButton13_Click()
'Pour le bouton valider Nouveau contact Client
Dim derligne As Integer
If MsgBox("Confirmes-tu Fati l'ajout de ce contact à ta base client?", vbYesNo, "Confirmation") = vbYes Then
derligne = Sheets("Client").Range("A1048576").End(xlUp).Row + 1
Cells(derligne, 1) = ComboBox9.Value
Cells(derligne, 2) = ComboBox4.Value
Cells(derligne, 3) = TextBox1.Value
Cells(derligne, 4) = TextBox2.Value
Cells(derligne, 5) = TextBox3.Value
Cells(derligne, 6) = TextBox4.Value
Cells(derligne, 7) = TextBox5.Value
Cells(derligne, 8) = TextBox6.Value
Cells(derligne, 9) = TextBox7.Value
Cells(derligne, 10) = TextBox8.Value
Cells(derligne, 11) = TextBox9.Value
Cells(derligne, 12) = TextBox10.Value
Cells(derligne, 13) = TextBox11.Value
Cells(derligne, 14) = TextBox14.Value
Cells(derligne, 15) = TextBox17.Value
Cells(derligne, 16) = TextBox18.Value
Cells(derligne, 17) = TextBox19.Value
Cells(derligne, 18) = TextBox20.Value
Cells(derligne, 19) = TextBox21.Value
Cells(derligne, 20) = TextBox22.Value
Cells(derligne, 21) = OptionButton4.Value
Cells(derligne, 22) = OptionButton3.Value
Cells(derligne, 23) = TextBox15.Value
Cells(derligne, 24) = TextBox16.Value
Cells(derligne, 25) = ComboBox10.Value
Cells(derligne, 26) = TextBox12.Value
MsgBox "Fati ton contact à bien été ajouter dans ta base de nouveaux Clients ", vbOKOnly + vbInformation, "CONFIRMATION"
End If
End Sub
Private Sub CommandButton14_Click()
'Pour le bouton Nouveau Prospect
Sheets("Prospects").Activate
Range("A1").Select
Selection.End(xlDown).Select 'onse positionne sur la derniere ligne non vide
Selection.Offset(1, 0).Select 'on se decale d'une ligne vers le bas
ActiveCell = ComboBox8.Value
ActiveCell.Offset(0, 1).Value = ComboBox4
ActiveCell.Offset(0, 2).Value = TextBox1
ActiveCell.Offset(0, 3).Value = TextBox2
ActiveCell.Offset(0, 4).Value = TextBox3
ActiveCell.Offset(0, 5).Value = TextBox4
ActiveCell.Offset(0, 6).Value = TextBox5
ActiveCell.Offset(0, 7).Value = TextBox6
ActiveCell.Offset(0, 8).Value = TextBox7
ActiveCell.Offset(0, 9).Value = TextBox8
ActiveCell.Offset(0, 10).Value = TextBox9
ActiveCell.Offset(0, 11).Value = TextBox10
ActiveCell.Offset(0, 11).Value = TextBox13
ActiveCell.Offset(0, 12).Value = TextBox11
ActiveCell.Offset(0, 13).Value = TextBox14
ActiveCell.Offset(0, 14).Value = TextBox17
ActiveCell.Offset(0, 15).Value = TextBox18
ActiveCell.Offset(0, 16).Value = TextBox19
ActiveCell.Offset(0, 17).Value = TextBox20
ActiveCell.Offset(0, 18).Value = TextBox21
ActiveCell.Offset(0, 20).Value = TextBox22
ActiveCell.Offset(0, 21).Value = CheckBox10
ActiveCell.Offset(0, 21).Value = CheckBox11
ActiveCell.Offset(0, 22).Value = TextBox15
ActiveCell.Offset(0, 23).Value = TextBox16
ActiveCell.Offset(0, 24).Value = TextBox23
ActiveCell.Offset(0, 24).Value = TextBox24
ActiveCell.Offset(0, 24).Value = TextBox25
ActiveCell.Offset(0, 24).Value = TextBox26
ActiveCell.Offset(0, 25).Value = TextBox12
MsgBox "votre contact à bien été ajouter dans votre base de nouveaux Prospects ", vbOKOnly + vbInformation, "CONFIRMATION"
End Sub
Private Sub CommandButton15_Click()
If MsgBox("Confirmez-vous la suppression de ce contact ?", vbYesNo, "Demande de confirmation de suppression") = vbYes Then
Rows([C2:C1048576].Find(TextBox1.Value).Row).EntireRow.Delete
Unload Me
UserForm1.Show
End If
End Sub
'ouvrir fiche client
Private Sub CommandButton2_Click()
Dim no_Ligne As Integer
no_Ligne = ComboBox2.ListIndex + 2
ComboBox9.Value = Cells(no - Ligne, 1)
ComboBox4.Value = Cells(no - Ligne, 2)
TextBox1.Value = Cells(no_Ligne, 3)
TextBox2.Value = Cells(no_Ligne, 4)
TextBox3.Value = Cells(no_Ligne, 5)
TextBox4.Value = Cells(no_Ligne, 6)
TextBox5.Value = Cells(no_Ligne, 7)
TextBox6.Value = Cells(no_Ligne, 8)
TextBox7.Value = Cells(no_Ligne, 9)
TextBox8.Value = Cells(no_Ligne, 10)
TextBox9.Value = Cells(no_Ligne, 11)
TextBox10.Value = Cells(no_Ligne, 12)
TextBox11.Value = Cells(no_Ligne, 13)
TextBox12.Value = Cells(no_Ligne, 26)
TextBox13.Value = Cells(no_Ligne, 12)
TextBox14.Value = Cells(no_Ligne, 14)
TextBox17.Value = Cells(no_Ligne, 15)
TextBox18.Value = Cells(no_Ligne, 16)
TextBox19.Value = Cells(no_Ligne, 17)
TextBox20.Value = Cells(no_Ligne, 18)
TextBox21.Value = Cells(no_Ligne, 19)
TextBox22.Value = Cells(no_Ligne, 20)
OptionButton3.Value = Cells(no_Ligne, 21)
OptionButton4.Value = Cells(no_Ligne, 22)
TextBox15.Value = Cells(no_Ligne, 23)
TextBox16.Value = Cells(no_Ligne, 24)
ComboBox10.Value = Cells(no_Ligne, 25)
TextBox12.Value = Cells(no_Ligne, 26)
End Sub
'ouvrir fichier relance
Private Sub CommandButton3_Click()
Dim no_Ligne As Integer
no_Ligne = ComboBox3.ListIndex + 2
ComboBox8.Value = Cells(no_Ligne, 1)
ComboBox4.Value = Cells(no_Ligne, 2)
TextBox1.Value = Cells(no_Ligne, 3)
TextBox2.Value = Cells(no_Ligne, 4)
TextBox3.Value = Cells(no_Ligne, 5)
TextBox4.Value = Cells(no_Ligne, 6)
TextBox5.Value = Cells(no_Ligne, 7)
TextBox6.Value = Cells(no_Ligne, 8)
TextBox7.Value = Cells(no_Ligne, 9)
TextBox8.Value = Cells(no_Ligne, 10)
TextBox9.Value = Cells(no_Ligne, 11)
TextBox16.Value = Cells(no_Ligne, 13)
TextBox10.Value = Cells(no_Ligne, 12)
TextBox11.Value = Cells(no_Ligne, 14)
ComboBox6.Value = Cells(no_Ligne, 15)
ComboBox5.Value = Cells(no_Ligne, 16)
ComboBox10.Value = Cells(no_Ligne, 17)
TextBox12.Value = Cells(no_Ligne, 18)
End Sub
Private Sub CommandButton5_Click()
'Pour le bouton Modifier fiche Prospects
Dim no_Ligne As Integer
Sheets("Prospects").Select
no_Ligne = ComboBox1.ListIndex + 2
If ComboBox1.Value = "" Then
MsgBox ("Veuillez remplir le champs de la recherche!")
Else
Cells(no_Ligne, 1) = ComboBox9.Value
Cells(no_Ligne, 2) = ComboBox4.Value
Cells(no_Ligne, 3) = TextBox1.Value
Cells(no_Ligne, 4) = TextBox2.Value
Cells(no_Ligne, 5) = TextBox3.Value
Cells(no_Ligne, 6) = TextBox4.Value
Cells(no_Ligne, 7) = TextBox5.Value
Cells(no_Ligne, 8) = TextBox6.Value
Cells(no_Ligne, 9) = TextBox7.Value
Cells(no_Ligne, 10) = TextBox8.Value
Cells(no_Ligne, 11) = TextBox9.Value
Cells(no_Ligne, 12) = TextBox10.Value
Cells(no_Ligne, 13) = TextBox11.Value
Cells(no_Ligne, 14) = TextBox14.Value
Cells(no_Ligne, 15) = TextBox17.Value
Cells(no_Ligne, 16) = TextBox18.Value
Cells(no_Ligne, 17) = TextBox19.Value
Cells(no_Ligne, 18) = TextBox20.Value
Cells(no_Ligne, 19) = TextBox21.Value
Cells(no_Ligne, 20) = TextBox22.Value
Cells(no_Ligne, 21) = OptionButton4.Value
Cells(no_Ligne, 22) = OptionButton3.Value
Cells(no_Ligne, 23) = TextBox15.Value
Cells(no_Ligne, 24) = TextBox16.Value
Cells(no_Ligne, 25) = ComboBox10.Value
Cells(no_Ligne, 26) = TextBox12.Value
End If
End Sub
Private Sub CommandButton6_Click()
'Pour le bouton Nouveau contact Relance
Sheets("Relance").Activate
Range("A1").Select
Selection.End(xlDown).Select 'onse positionne sur la derniere ligne non vide
Selection.Offset(1, 0).Select 'on se decale d'une ligne vers le bas
ActiveCell = ComboBox8.Value
ActiveCell.Offset(0, 1).Value = ComboBox9
ActiveCell.Offset(0, 2).Value = ComboBox4
ActiveCell.Offset(0, 3).Value = TextBox1
ActiveCell.Offset(0, 4).Value = TextBox2
ActiveCell.Offset(0, 5).Value = TextBox3
ActiveCell.Offset(0, 6).Value = TextBox4
ActiveCell.Offset(0, 7).Value = TextBox5
ActiveCell.Offset(0, 8).Value = TextBox6
ActiveCell.Offset(0, 9).Value = TextBox7
ActiveCell.Offset(0, 10).Value = TextBox8
ActiveCell.Offset(0, 11).Value = TextBox9
ActiveCell.Offset(0, 12).Value = TextBox10
ActiveCell.Offset(0, 13).Value = TextBox16
ActiveCell.Offset(0, 14).Value = TextBox11
ActiveCell.Offset(0, 15).Value = ComboBox6
ActiveCell.Offset(0, 16).Value = ComboBox5
ActiveCell.Offset(0, 17).Value = ComboBox10
ActiveCell.Offset(0, 18).Value = TextBox12
MsgBox "Fati ton contact à bien été ajouter dans ta base de données", vbOKOnly + vbInformation, "CONFIRMATION"
End Sub
Private Sub CommandButton7_Click()
Unload Me
End Sub
'***********************************************
'procedure de modification client
'***********************************************
Private Sub CommandButton8_Click()
'Pour le bouton Modifier fiche client
Dim no_Ligne As Integer
Sheets("Client").Select
no_Ligne = ComboBox2.ListIndex + 2
If ComboBox2.Value = "" Then
MsgBox ("Veuillez remplir le champs de la recherche!")
Else
Cells(no_Ligne, 1) = ComboBox9.Value
Cells(no_Ligne, 2) = ComboBox4.Value
Cells(no_Ligne, 3) = TextBox1.Value
Cells(no_Ligne, 4) = TextBox2.Value
Cells(no_Ligne, 5) = TextBox3.Value
Cells(no_Ligne, 6) = TextBox4.Value
Cells(no_Ligne, 7) = TextBox5.Value
Cells(no_Ligne, 8) = TextBox6.Value
Cells(no_Ligne, 9) = TextBox7.Value
Cells(no_Ligne, 10) = TextBox8.Value
Cells(no_Ligne, 11) = TextBox9.Value
Cells(no_Ligne, 12) = TextBox10.Value
Cells(no_Ligne, 13) = TextBox11.Value
Cells(no_Ligne, 14) = TextBox14.Value
Cells(no_Ligne, 15) = TextBox17.Value
Cells(no_Ligne, 16) = TextBox18.Value
Cells(no_Ligne, 17) = TextBox19.Value
Cells(no_Ligne, 18) = TextBox20.Value
Cells(no_Ligne, 19) = TextBox21.Value
Cells(no_Ligne, 20) = TextBox22.Value
Cells(no_Ligne, 21) = OptionButton4.Value
Cells(no_Ligne, 22) = OptionButton3.Value
Cells(no_Ligne, 23) = TextBox15.Value
Cells(no_Ligne, 24) = TextBox16.Value
Cells(no_Ligne, 25) = ComboBox10.Value
Cells(no_Ligne, 26) = TextBox12.Value
End If
End Sub
Private Sub CommandButton9_Click()
'Pour le bouton Modifier fiche Relance
If MsgBox("Confirmez-vous la modification à votre base relance ?", vbYesNo, "Confirmation") = vbYes Then
Dim no_Ligne As Integer
Sheets("Relance").Select
no_Ligne = ComboBox3.ListIndex + 2
If ComboBox3.Value = "" Then
MsgBox ("Veuillez remplir le champs de la recherche!")
Else
Cells(no_Ligne, 1) = ComboBox9.Value
Cells(no_Ligne, 2) = ComboBox4.Value
Cells(no_Ligne, 3) = TextBox1.Value
Cells(no_Ligne, 4) = TextBox2.Value
Cells(no_Ligne, 5) = TextBox3.Value
Cells(no_Ligne, 6) = TextBox4.Value
Cells(no_Ligne, 7) = TextBox5.Value
Cells(no_Ligne, 8) = TextBox6.Value
Cells(no_Ligne, 9) = TextBox7.Value
Cells(no_Ligne, 10) = TextBox8.Value
Cells(no_Ligne, 11) = TextBox9.Value
Cells(no_Ligne, 12) = TextBox10.Value
Cells(no_Ligne, 13) = TextBox16.Value
Cells(no_Ligne, 14) = TextBox11.Value
Cells(no_Ligne, 15) = ComboBox6.Value
Cells(no_Ligne, 16) = ComboBox5.Value
Cells(no_Ligne, 17) = ComboBox10.Value
Cells(no_Ligne, 18) = TextBox12.Value
MsgBox "La modification à bien été effectuer dans votre base de relance ", vbOKOnly + vbInformation, "CONFIRMATION"
End If
End If
End Sub
Private Sub Frame2_Click()
End Sub
Private Sub Frame5_Click()
End Sub
Private Sub Frame6_Click()
End Sub
Private Sub Label11_Click()
End Sub
Private Sub Label21_Click()
End Sub
Private Sub Label22_Click()
[T2] = TextBox22
End Sub
Private Sub Label23_Click()
End Sub
Private Sub Label24_Click()
End Sub
Private Sub Label5_Click()
End Sub
Private Sub Label6_Click()
End Sub
Private Sub OptionButton3_Click()
Cells(no_Ligne, 21).NumberFormat = "general"
Cells(no_Ligne, 21) = Abs(OptionButton3.Value)
End Sub
Private Sub OptionButton4_Click()
Cells(no_Ligne, 21).NumberFormat = "general"
Cells(no_Ligne, 21) = Abs(OptionButton3.Value)
End Sub
Private Sub TextBox1_Change()
If TextBox1 <> "" Then
CommandButton14.Enabled = True
Else
CommandButton14.Enabled = False
End If
End Sub
Private Sub TextBox12_Change()
End Sub
Private Sub TextBox13_Change()
If TextBox13 <> "" Then
CommandButton13.Enabled = True
Else
CommandButton13.Enabled = False
End If
End Sub
Private Sub TextBox14_Change()
End Sub
Private Sub TextBox16_Change()
If TextBox16 <> "" Then
CommandButton6.Enabled = True
Else
CommandButton6.Enabled = False
End If
End Sub
Private Sub TextBox17_Change()
End Sub
Private Sub TextBox22_Change()
End Sub
Private Sub TextBox23_Change()
End Sub
Private Sub UserForm_Click()
End Sub
'***********************************
'procedure de reinitialisation des
'champs du formulaire
'************************************
Private Sub CommandButton4_Click()
TextBox1 = ""
TextBox2 = ""
TextBox3 = ""
TextBox4 = ""
TextBox5 = ""
TextBox6 = ""
TextBox7 = ""
TextBox8 = ""
TextBox9 = ""
TextBox10 = ""
TextBox11 = ""
TextBox12 = ""
TextBox13 = ""
TextBox14 = ""
TextBox15 = ""
TextBox16 = ""
TextBox17 = ""
TextBox18 = ""
TextBox19 = ""
TextBox20 = ""
TextBox21 = ""
TextBox22 = ""
TextBox23 = ""
TextBox24 = ""
TextBox25 = ""
TextBox26 = ""
ComboBox1 = ""
ComboBox2 = ""
ComboBox3 = ""
ComboBox4 = ""
ComboBox5 = ""
ComboBox6 = ""
ComboBox8 = ""
ComboBox9 = ""
ComboBox10 = ""
CheckBox1 = ""
CheckBox2 = ""
CheckBox3 = ""
CheckBox4 = ""
CheckBox5 = ""
CheckBox6 = ""
CheckBox7 = ""
CheckBox8 = ""
CheckBox9 = ""
OptionButton1 = ""
OptionButton2 = ""
OptionButton3 = ""
OptionButton4 = ""
CheckBox10 = ""
CheckBox11 = ""
End Sub |
Partager