Bonjour,

je n'arrive plus à copier coller dès que j'active l'évènement suivant.

En gros, dès que je change de feuille, je n'ai plus le menu de collage. Et toutes mes macros de copy ne fonctionnent plus..

Si quelqu'un à une idée ? je vous remercie,

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
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
Private Sub appXls_SheetActivate(ByVal Sh As Object)
 
 
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
 
 
If Sh.Name = "acceuil" Then
 
Dim derlign As Integer
derlign = Sh.Previous.Range("A" & Rows.Count).End(xlUp).Row + 100
 
'code client+ca
 
Sh.Range("d12:d" & derlign).Value = Sh.Previous.Range("a2:a" & derlign).Value
 
Sh.Range("E12:E" & derlign).Value = Sh.Previous.Range("X2:X" & derlign).Value
 
'honos
 
Sh.Range("f12:f" & derlign).Value = Sh.Previous.Range("s2:s" & derlign).Value
 
'ir
 
Sh.Range("g12:g" & derlign).Value = Sh.Previous.Range("l2:l" & derlign).Value
 
'taux horaire
Sh.Range("h12:h" & derlign).Value = Sh.Previous.Range("by2:by" & derlign).Value
 
 
 
 
'actualisation feuille client
 
Dim i As Integer
 
For i = 1 To derlign + 2
 
If Sh.Range("y1").Value = Sh.Previous.Cells(i, 1) Then
 
 
Sh.Next.Range("d7") = Sh.Previous.Cells(i, 2)
 
Sh.Next.Range("d8") = Sh.Previous.Cells(i, 3)
 
Sh.Next.Range("d9") = Sh.Previous.Cells(i, 4)
 
Sh.Next.Range("d10") = Sh.Previous.Cells(i, 5)
 
Sh.Next.Range("d11") = Sh.Previous.Cells(i, 6)
 
Sh.Next.Range("d12") = Sh.Previous.Cells(i, 22)
 
Sh.Next.Range("d13") = Sh.Previous.Cells(i, 24)
 
Sh.Next.Range("i7") = Sh.Previous.Cells(i, 7)
 
Sh.Next.Range("i8") = Sh.Previous.Cells(i, 8)
 
Sh.Next.Range("i9") = Sh.Previous.Cells(i, 10)
Sh.Next.Range("i9").NumberFormat = "dd/mm/yyyy"
 
Sh.Next.Range("i10") = Sh.Previous.Cells(i, 12)
 
Sh.Next.Range("i11") = Sh.Previous.Cells(i, 68)
 
Sh.Next.Range("i12") = Sh.Previous.Cells(i, 69)
 
Sh.Next.Range("i13") = Sh.Previous.Cells(i, 70)
 
Sh.Next.Range("a2") = "client depuis le " & Sh.Previous.Cells(i, 21)
Sh.Next.Range("c2") = Sh.Previous.Cells(i, 67)
 
Sh.Next.Range("f1") = Sh.Previous.Cells(i, 19) & " € "
Sh.Next.Range("f1").NumberFormat = "0 $"
 
Sh.Next.Range("i1") = Sh.Previous.Cells(i, 13)
Sh.Next.Range("i1").NumberFormat = "0"
 
 
 
 
 
End If
 
Next i
End If
 
 
 'actualisation feuille equipement
 
 
 
 
 
 
 
 
For i = 1 To derlign
 
If Sh.Range("y1").Value = Sh.Previous.Cells(i, 1) Then
 
 
 
Sh.Next.Next.Range("e13") = Sh.Previous.Cells(i, 57)
Sh.Next.Next.Range("e14") = Sh.Previous.Cells(i, 61)
Sh.Next.Next.Range("e15") = Sh.Previous.Cells(i, 16)
Sh.Next.Next.Range("e16") = Sh.Previous.Cells(i, 17)
Sh.Next.Next.Range("e17") = Sh.Previous.Cells(i, 58)
Sh.Next.Next.Range("e18") = Sh.Previous.Cells(i, 60)
Sh.Next.Next.Range("h13") = Sh.Previous.Cells(i, 62)
Sh.Next.Next.Range("h14") = Sh.Previous.Cells(i, 15)
Sh.Next.Next.Range("h15") = Sh.Previous.Cells(i, 54)
Sh.Next.Next.Range("h16") = Sh.Previous.Cells(i, 55)
Sh.Next.Next.Range("h17") = Sh.Previous.Cells(i, 59)
Sh.Next.Next.Range("k15") = Sh.Previous.Cells(i, 18)
Sh.Next.Next.Range("k16") = Sh.Previous.Cells(i, 56)
Sh.Next.Next.Range("k14") = Sh.Previous.Cells(i, 65)
Sh.Next.Next.Range("k13") = Sh.Previous.Cells(i, 66)
Sh.Next.Next.Range("f1") = Sh.Previous.Cells(i, 19) & " € "
Sh.Next.Next.Range("f1").NumberFormat = "0 $"
Sh.Next.Next.Range("h18") = Sh.Previous.Cells(i, 63)
Sh.Next.Next.Range("h19") = Sh.Previous.Cells(i, 64)
 
Sh.Next.Next.Range("a2") = "client depuis le " & Sh.Previous.Cells(i, 21)
 
End If
 
Next i
 
 
  'actualisation feuille mission
 
 
 
 
 
 
 
 
For i = 1 To derlign
 
If Sh.Range("y1").Value = Sh.Previous.Cells(i, 1) Then
 
Sh.Next.Next.Next.Range("a2") = "client depuis le " & Sh.Previous.Cells(i, 21)
 
Sh.Next.Next.Next.Range("f1") = Sh.Previous.Cells(i, 19)
Sh.Next.Next.Next.Range("f1") = Sh.Previous.Cells(i, 19) & " € "
Sh.Next.Next.Next.Range("f1").NumberFormat = "0 $"
 
Sh.Next.Next.Next.Range("c12:h1000").ClearContents
 
 
Sh.Next.Next.Next.Range("c12") = Sh.Previous.Previous.Cells(i, 2)
Sh.Next.Next.Next.Range("c13") = Sh.Previous.Previous.Cells(i, 3)
Sh.Next.Next.Next.Range("c14") = Sh.Previous.Previous.Cells(i, 4)
Sh.Next.Next.Next.Range("c16") = Sh.Previous.Previous.Cells(i, 5)
Sh.Next.Next.Next.Range("c15") = Sh.Previous.Previous.Cells(i, 6)
Sh.Next.Next.Next.Range("c17") = Sh.Previous.Previous.Cells(i, 7)
Sh.Next.Next.Next.Range("c18") = Sh.Previous.Previous.Cells(i, 8)
Sh.Next.Next.Next.Range("c19") = Sh.Previous.Previous.Cells(i, 9)
Sh.Next.Next.Next.Range("c20") = Sh.Previous.Previous.Cells(i, 10)
Sh.Next.Next.Next.Range("c21") = Sh.Previous.Previous.Cells(i, 11)
Sh.Next.Next.Next.Range("c22") = Sh.Previous.Previous.Cells(i, 12)
Sh.Next.Next.Next.Range("c23") = Sh.Previous.Previous.Cells(i, 13)
Sh.Next.Next.Next.Range("c24") = Sh.Previous.Previous.Cells(i, 14)
Sh.Next.Next.Next.Range("c25") = Sh.Previous.Previous.Cells(i, 15)
Sh.Next.Next.Next.Range("c26") = Sh.Previous.Previous.Cells(i, 16)
Sh.Next.Next.Next.Range("c27") = Sh.Previous.Previous.Cells(i, 17)
 
Sh.Next.Next.Next.Range("c28") = Sh.Previous.Previous.Cells(i, 18)
Sh.Next.Next.Next.Range("c29") = Sh.Previous.Previous.Cells(i, 19)
 
 
Sh.Next.Next.Next.Range("c30") = Sh.Previous.Previous.Cells(i, 20)
Sh.Next.Next.Next.Range("c31") = Sh.Previous.Previous.Cells(i, 21)
Sh.Next.Next.Next.Range("c32") = Sh.Previous.Previous.Cells(i, 22)
Sh.Next.Next.Next.Range("c33") = Sh.Previous.Previous.Cells(i, 23)
Sh.Next.Next.Next.Range("c34") = Sh.Previous.Previous.Cells(i, 24)
Sh.Next.Next.Next.Range("c35") = Sh.Previous.Previous.Cells(i, 25)
 
Sh.Next.Next.Next.Range("c37") = Sh.Previous.Previous.Cells(i, 27)
Sh.Next.Next.Next.Range("c38") = Sh.Previous.Previous.Cells(i, 28)
Sh.Next.Next.Next.Range("c39") = Sh.Previous.Previous.Cells(i, 29)
Sh.Next.Next.Next.Range("c40") = Sh.Previous.Previous.Cells(i, 30)
Sh.Next.Next.Next.Range("c41") = Sh.Previous.Previous.Cells(i, 31)
 
 
Sh.Next.Next.Next.Range("c42") = Sh.Previous.Previous.Cells(i, 32)
Sh.Next.Next.Next.Range("c43") = Sh.Previous.Previous.Cells(i, 33)
Sh.Next.Next.Next.Range("c44") = Sh.Previous.Previous.Cells(i, 34)
 
 
Sh.Next.Next.Next.Range("c45") = Sh.Previous.Previous.Cells(i, 35)
Sh.Next.Next.Next.Range("c46") = Sh.Previous.Previous.Cells(i, 36)
Sh.Next.Next.Next.Range("c47") = Sh.Previous.Previous.Cells(i, 37)
 
 
Sh.Next.Next.Next.Range("c48") = Sh.Previous.Previous.Cells(i, 38)
Sh.Next.Next.Next.Range("c49") = Sh.Previous.Previous.Cells(i, 39)
Sh.Next.Next.Next.Range("c50") = Sh.Previous.Previous.Cells(i, 40)
Sh.Next.Next.Next.Range("c51") = Sh.Previous.Previous.Cells(i, 41)
 
 
Sh.Next.Next.Next.Range("c52") = Sh.Previous.Previous.Cells(i, 42)
Sh.Next.Next.Next.Range("c53") = Sh.Previous.Previous.Cells(i, 43)
 
 
Sh.Next.Next.Next.Range("c54") = Sh.Previous.Previous.Cells(i, 44)
 
 
Sh.Next.Next.Next.Range("c55") = Sh.Previous.Previous.Cells(i, 45)
 
 
Sh.Next.Next.Next.Range("c56") = Sh.Previous.Previous.Cells(i, 46)
 
On Error Resume Next
 
 Sh.Next.Next.Next.Range("$C$11:$h$1000").AutoFilter Field:=1, Criteria1:="<>"
 
End If
 
Next i
 
 
 
 
   Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic
 
End Sub