W
winieloursonaub
Guest
Bonjour à tous
j'essais de créer un programme sous excel vba, je suis débutante et là j'ai un problème que je n'arrive pas à résoudre donc je fais appel à toutes les bonnes volontés qui veulent bien m'aider.
Voilà j'arrive très bien à afficher mon userform et à taper du text mais lorsque je valide sur le bouton ok il me renvoie à une ligne ou il y a CInt, et là je ne sais pas quoi faire.
et sauve_prest c'est
Merci à tous ceux qui m'aideront sur mon problème.
winnie
j'essais de créer un programme sous excel vba, je suis débutante et là j'ai un problème que je n'arrive pas à résoudre donc je fais appel à toutes les bonnes volontés qui veulent bien m'aider.
Voilà j'arrive très bien à afficher mon userform et à taper du text mais lorsque je valide sur le bouton ok il me renvoie à une ligne ou il y a CInt, et là je ne sais pas quoi faire.
Code:
Private Sub CommandButton1_Click()
nouv = False
If société = "" Then Fiche_prestataire.Hide: Exit Sub
Call sauve_prest
Unload Me
End Sub
et sauve_prest c'est
Code:
Public Sub sauve_prest()
If Fiche_prestataire.société = "" Then Exit Sub
With Sheets("Prestatairebase")
.Cells(adh, 1) = CInt(Fiche_prestataire.NUM)
.Cells(adh, 2) = Fiche_prestataire.Secteur
.Cells(adh, 3) = Fiche_prestataire.NOM
.Cells(adh, 4) = Fiche_prestataire.Prénom
.Cells(adh, 5) = Fiche_prestataire.société
.Cells(adh, 6) = Fiche_prestataire.immatriculation
.Cells(adh, 7) = Fiche_prestataire.signature
.Cells(adh, 8) = Fiche_prestataire.adresse
.Cells(adh, 9) = Fiche_prestataire.cp
.Cells(adh, 10) = Fiche_prestataire.ville
.Cells(adh, 11) = Fiche_prestataire.téléphone
.Cells(adh, 12) = Fiche_prestataire.portable
.Cells(adh, 13) = Fiche_prestataire.fax
.Cells(adh, 14) = Fiche_prestataire.email
.Cells(adh, 15) = Fiche_prestataire.rc
.Cells(adh, 16) = Fiche_prestataire.assureurrc
.Cells(adh, 17) = Fiche_prestataire.dc
.Cells(adh, 18) = Fiche_prestataire.assureurdc
Merci à tous ceux qui m'aideront sur mon problème.
winnie