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
| Sub CommandButton1_Click()
Dim I As Integer, FL1 As Worksheet
IndexOnglet1 = ComboBox1.ListIndex
Q1 = ComboBox1.List(IndexOnglet1)
IndexOnglet2 = ComboBox9.ListIndex
Q2 = ComboBox9.List(IndexOnglet2)
IndexOnglet3 = ComboBox10.ListIndex
Q3 = ComboBox10.List(IndexOnglet3)
IndexOnglet4 = ComboBox11.ListIndex
Q4 = ComboBox11.List(IndexOnglet4)
IndexOnglet5 = ComboBox5.ListIndex
Q5 = ComboBox5.List(IndexOnglet5)
IndexOnglet6 = ComboBox12.ListIndex
Q6 = ComboBox12.List(IndexOnglet6)
IndexOnglet7 = ComboBox13.ListIndex
Q7 = ComboBox13.List(IndexOnglet7)
IndexOnglet8 = ComboBox14.ListIndex
Q8 = ComboBox14.List(IndxOnglet8)
Set FL1 = Worksheets("Feuil1")
With FL1
I = .Cells(1, .Columns.Count).End(xlToLeft).Column + 1
.cells(1,I) = "Questionnaire X"
.Cells(2, I).Value = Q1
.Cells(3, I).Value = Q2
.Cells(4, I).Value = Q3
.Cells(5, I).Value = Q4
.Cells(6, I).Value = TextBox1
.Cells(7, I).Value = Q5
.Cells(8, I).Value = Q6
.Cells(9, I).Value = Q7
.Cells(10, I).Value = Q8
.Cells(11, I).Value = TextBox2
.Cells(12, I).Value = TextBox3
End With
Set FL1 = Nothing
MsgBox "Questionnaire enregistré"
End Sub |
Partager