Pb formulaire de saisie dans userform

poolinn22

XLDnaute Nouveau
bonjour,

j'ai une erreur dans mon écriture VBA. Je souhaiterai que les données inscrites dans mon userform apparaissent directement dans mon tableau de suivi en cliquant sur le bouton 'validation'. Pouvez vous m'aider?

merci


Sub Validation_Click()

With bureaudetude

derlign = .Range("a65536").End(xlUp).Row + 1

.Cells(derlign, 1) = Me.Date_Saisie
.Cells(derlign, 2) = Me.Nom_Projet 'Nom projet
.Cells(derlign, 3) = Me.Dep_projet 'departement projet
.Cells(derlign, 4) = Me.Q_01 'phase du projet
.Cells(derlign, 5) = Me.ENTREPRISE_ATTRIBUTION 'entreprise attributrice
.Cells(emptyRow, 6) = Me.ENTREPRISE_GENERALE 'entreprise generale
.Cells(emptyRow, 7) = Me.TYPE_COMPTAGE 'type de comptage
.Cells(emptyRow, 8) = Me.BUREAU_ETUDE 'Nom du bureau d'etude
.Cells(emptyRow, 9) = Me.DEP_BE 'département BE
' .Cells(emptyRow, 10) = Me. 'code postal
.Cells(emptyRow, 11) = Me.fdruyti
.Cells(emptyRow, 12) = Me.ghhgj
.Cells(emptyRow, 13) = Me.dgbjkfh
.Cells(emptyRow, 14) = Me.rjehthj
.Cells(emptyRow, 15) = Me.jghtt
.Cells(emptyRow, 16) = Me.AUTRE 'AUTRE
.Cells(emptyRow, 17) = Me.AUCUN 'AUCUN
.Cells(emptyRow, 18) = Me.TYPE_MATERIEL 'TYPE DE MATERIEL EN PLACE
.Cells(emptyRow, 19) = Me.Commentaires 'Commentaires

End With

End Sub
 
Dernière édition:

laetitia90

XLDnaute Barbatruc
Re : Pb formulaire de saisie dans userform

re,:) bonsoir jpb

vu le fichier sans tout boulverser combo a la la place OptionButton plus simple a mon avis ect....

manipuler .TAG pour simplifier mais bon pas le temps de construire cela

j'ai seulement renommé OptionButton & CheckBox

With Feuil102 code name de la feuille plus simple

Code:
Sub Validation_Click()
   With Feuil102
  der = .Cells(Rows.Count, 1).End(3)(2).Row
  .Cells(der, 1) = Date_Saisie
  .Cells(der, 2) = Nom_Projet
  .Cells(der, 3) = Dep_projet
  For y = 3 To 9
  If Me("Op" & y) Then .Cells(der, 4) = Me("Op" & y).Caption
  Next y
  .Cells(der, 5) = ENTREPRISE_ATTRIBUTION
  .Cells(der, 6) = ENTREPRISE_GENERALE
  For y = 10 To 12
  If Me("Op" & y) Then .Cells(der, 7) = Me("Op" & y).Caption
  Next y
  .Cells(der, 8) = BUREAU_ETUDE
  .Cells(der, 9) = DEP_BE
  .Cells(der, 10) = TextBox1
  For y = 1 To 7
  If Me("Ch" & y) Then .Cells(der, y + 10) = Me("Ch" & y).Caption
  Next y
  For y = 13 To 15
  If Me("Op" & y) Then .Cells(der, 18) = Me("Op" & y).Caption
  Next y
  .Cells(der, 19) = Commentaires
  End With
End Sub
 

Pièces jointes

  • questionnaire (1).xls
    73 KB · Affichages: 38

Discussions similaires

Statistiques des forums

Discussions
314 238
Messages
2 107 622
Membres
109 880
dernier inscrit
marc Deburaux