Bonjour j'ai mon code qui a arrété de fonctionné.
je gere deux feuilles ouvertes a partir d'un combobox
ça marchait parfaitement mais ça s'est arreté de fonctionner et on me sort une erreur au niveau du With Workbooks("AVIONS").Sheets("Me.ComboBox2.Value")
mon classeurs avion est le classeur principale, c'est celui qui a le userform en son sein.

Merci de bien vouloir m'aider
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
Private Sub CommandButton1_Click()
 
With Workbooks("C-CLIENT").Sheets(Me.ComboBox1.Value)
    rw2 = .Cells(Rows.Count, "A").End(xlUp).Row + 1
 
            .Range("A" & rw2) = ComboBox1.Value
            .Range("B" & rw2) = TextBox5.Value
            .Range("C" & rw2) = TextBox2.Text
            .Range("D" & rw2) = TextBox4.Text
            .Range("E" & rw2) = TextBox6.Text
            .Range("F" & rw2) = TextBox3.Text
            .Range("H" & rw2) = ComboBox2.Text
            .Range("G" & rw2) = TextBox10.Text
 
 
End With
With Workbooks("AVIONS").Sheets("Me.ComboBox2.Value")
    rw1 = .Cells(Rows.Count, "A").End(xlUp).Row + 1
            .Range("A" & rw2) = ComboBox1.Value
            .Range("B" & rw2) = TextBox5.Value
            .Range("C" & rw2) = TextBox2.Text
            .Range("D" & rw2) = TextBox4.Text
            .Range("E" & rw2) = TextBox6.Text
            .Range("F" & rw2) = TextBox3.Text
            .Range("H" & rw2) = ComboBox2.Text
            .Range("G" & rw2) = TextBox10.Text
 
 
 
 
End With
ComboBox1.Text = ""
ComboBox2.Text = ""
TextBox2.Text = ""
TextBox3.Text = ""
TextBox10.Text = ""
TextBox5.Text = ""
TextBox6.Text = ""
TextBox4.Text = ""
 
MsgBox ("ENREGISTREMENT EFFECTUER")
End Sub
je rappel que j'ai mis ce code (suivant) pour selectionner les feuilles dans les differents classeurs afin d'enregistrer les informations
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Private Sub Userform_Initialize()
Set wk1 = ThisWorkbook  '<--- AVION
Set wk2 = Workbooks("C-CLIENT.xlsm")
Dim ws As Worksheet
Dim WF As Worksheet
 
For Each ws In wk1.Worksheets
Me.ComboBox2.AddItem ws.Name
Next ws
 
For Each WF In wk2.Sheets
Me.ComboBox1.AddItem WF.Name
Next WF
End Sub