Améliorer et simplifier macro

Gilles25

XLDnaute Junior
Bonjour le forum,

voici le code d'une macro,qui j'en suis sûr va faire bondir les puristes, j'aimerais juste la simplifiée pour la reproduire, elle me permet de remettre à zéro (vierge de toutes nouvelles données) l'ensemble d'un planning, elle concernera des feuilles nomées '1janvier' à '11janvier', '1février' à '11février', '1mars' à '11mars' et '1avril' à '11avril' soit 44 feuilles, la macro mise en copie concerne la feuille '1janvier' elle est protéger sans mot de passe, je souhaterais juste faire la même chose pour les 33 autres en l'assoçiant à un bouton.

Merci pour le coup de main.

A+ GILLES


Sub Macro22miseàzérofeuilledegarde()
'
' Macro22miseàzérofeuilledegarde Macro
' Macro enregistrée le 20/04/2006 par Gilles THOMAS
'

'
Sheets('1janvier ').Select
ActiveSheet.Unprotect
Range('A5:L5').Select
Range('L5').Activate
Selection.EntireColumn.Hidden = False
Selection.AutoFilter Field:=1
ActiveWindow.ScrollColumn = 2
ActiveWindow.ScrollColumn = 4
ActiveWindow.ScrollColumn = 5
ActiveWindow.ScrollColumn = 6
ActiveWindow.ScrollColumn = 7
ActiveWindow.ScrollColumn = 9
ActiveWindow.ScrollColumn = 10
Sheets('originalfeuilgarde').Select
Range('W14:AI199').Select
Selection.Copy
Sheets('1janvier ').Select
Range('W14:AI14').Select
ActiveSheet.Paste
Sheets('originalfeuilgarde').Select
ActiveWindow.SmallScroll Down:=12
Range('W208:AI350').Select
Application.CutCopyMode = False
Selection.Copy
Sheets('1janvier ').Select
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 11
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 17
ActiveWindow.ScrollRow = 20
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 28
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 34
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 38
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 45
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 48
ActiveWindow.ScrollRow = 49
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 51
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 54
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 56
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 58
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 63
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 65
ActiveWindow.ScrollRow = 67
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 70
ActiveWindow.ScrollRow = 71
ActiveWindow.ScrollRow = 73
ActiveWindow.ScrollRow = 74
ActiveWindow.ScrollRow = 75
ActiveWindow.ScrollRow = 76
ActiveWindow.ScrollRow = 78
ActiveWindow.ScrollRow = 79
ActiveWindow.ScrollRow = 80
ActiveWindow.ScrollRow = 81
ActiveWindow.ScrollRow = 82
ActiveWindow.ScrollRow = 83
ActiveWindow.ScrollRow = 84
ActiveWindow.ScrollRow = 85
ActiveWindow.ScrollRow = 87
ActiveWindow.ScrollRow = 89
ActiveWindow.ScrollRow = 90
ActiveWindow.ScrollRow = 92
ActiveWindow.ScrollRow = 93
ActiveWindow.ScrollRow = 96
ActiveWindow.ScrollRow = 97
ActiveWindow.ScrollRow = 98
ActiveWindow.ScrollRow = 99
ActiveWindow.ScrollRow = 100
ActiveWindow.ScrollRow = 101
ActiveWindow.ScrollRow = 102
ActiveWindow.ScrollRow = 104
ActiveWindow.ScrollRow = 106
ActiveWindow.ScrollRow = 107
ActiveWindow.ScrollRow = 109
ActiveWindow.ScrollRow = 112
ActiveWindow.ScrollRow = 113
ActiveWindow.ScrollRow = 114
ActiveWindow.ScrollRow = 115
ActiveWindow.ScrollRow = 116
ActiveWindow.ScrollRow = 117
ActiveWindow.ScrollRow = 119
ActiveWindow.ScrollRow = 121
ActiveWindow.ScrollRow = 122
ActiveWindow.ScrollRow = 123
ActiveWindow.ScrollRow = 124
ActiveWindow.ScrollRow = 125
ActiveWindow.ScrollRow = 126
ActiveWindow.ScrollRow = 127
ActiveWindow.ScrollRow = 129
ActiveWindow.ScrollRow = 130
ActiveWindow.ScrollRow = 131
ActiveWindow.ScrollRow = 132
ActiveWindow.ScrollRow = 133
ActiveWindow.ScrollRow = 135
ActiveWindow.ScrollRow = 138
ActiveWindow.ScrollRow = 139
ActiveWindow.ScrollRow = 140
ActiveWindow.ScrollRow = 141
ActiveWindow.ScrollRow = 143
ActiveWindow.ScrollRow = 144
ActiveWindow.ScrollRow = 146
ActiveWindow.ScrollRow = 148
ActiveWindow.ScrollRow = 150
ActiveWindow.ScrollRow = 151
ActiveWindow.ScrollRow = 152
ActiveWindow.ScrollRow = 155
ActiveWindow.ScrollRow = 157
ActiveWindow.ScrollRow = 158
ActiveWindow.ScrollRow = 159
ActiveWindow.ScrollRow = 161
ActiveWindow.ScrollRow = 163
ActiveWindow.ScrollRow = 165
ActiveWindow.ScrollRow = 166
ActiveWindow.ScrollRow = 167
ActiveWindow.ScrollRow = 168
ActiveWindow.ScrollRow = 169
ActiveWindow.ScrollRow = 170
ActiveWindow.ScrollRow = 172
ActiveWindow.ScrollRow = 174
ActiveWindow.ScrollRow = 176
ActiveWindow.ScrollRow = 178
ActiveWindow.ScrollRow = 181
ActiveWindow.ScrollRow = 183
ActiveWindow.ScrollRow = 184
ActiveWindow.ScrollRow = 185
ActiveWindow.ScrollRow = 186
ActiveWindow.ScrollRow = 187
ActiveWindow.ScrollRow = 189
ActiveWindow.ScrollRow = 190
ActiveWindow.ScrollRow = 191
ActiveWindow.ScrollRow = 192
ActiveWindow.ScrollRow = 193
ActiveWindow.ScrollRow = 194
ActiveWindow.ScrollRow = 195
ActiveWindow.ScrollRow = 197
ActiveWindow.ScrollRow = 198
ActiveWindow.ScrollRow = 199
ActiveWindow.ScrollRow = 200
ActiveWindow.ScrollRow = 201
Range('W208:AI208').Select
ActiveSheet.Paste
Sheets('originalfeuilgarde').Select
ActiveWindow.ScrollRow = 339
ActiveWindow.ScrollRow = 340
ActiveWindow.ScrollRow = 342
ActiveWindow.ScrollRow = 343
ActiveWindow.ScrollRow = 344
ActiveWindow.ScrollRow = 345
ActiveWindow.ScrollRow = 346
ActiveWindow.ScrollRow = 347
ActiveWindow.ScrollRow = 348
ActiveWindow.ScrollRow = 349
ActiveWindow.ScrollRow = 351
ActiveWindow.ScrollRow = 352
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 354
ActiveWindow.ScrollRow = 355
ActiveWindow.ScrollRow = 356
Range('L358:AI421').Select
Application.CutCopyMode = False
Selection.Copy
Sheets('originalfeuilgarde').Select
ActiveWindow.SmallScroll Down:=-60
Sheets('1janvier ').Select
ActiveWindow.ScrollRow = 202
ActiveWindow.ScrollRow = 203
ActiveWindow.ScrollRow = 204
ActiveWindow.ScrollRow = 206
ActiveWindow.ScrollRow = 207
ActiveWindow.ScrollRow = 208
ActiveWindow.ScrollRow = 209
ActiveWindow.ScrollRow = 210
ActiveWindow.ScrollRow = 211
ActiveWindow.ScrollRow = 212
ActiveWindow.ScrollRow = 215
ActiveWindow.ScrollRow = 217
ActiveWindow.ScrollRow = 218
ActiveWindow.ScrollRow = 219
ActiveWindow.ScrollRow = 220
ActiveWindow.ScrollRow = 221
ActiveWindow.ScrollRow = 223
ActiveWindow.ScrollRow = 224
ActiveWindow.ScrollRow = 225
ActiveWindow.ScrollRow = 226
ActiveWindow.ScrollRow = 227
ActiveWindow.ScrollRow = 229
ActiveWindow.ScrollRow = 232
ActiveWindow.ScrollRow = 234
ActiveWindow.ScrollRow = 237
ActiveWindow.ScrollRow = 238
ActiveWindow.ScrollRow = 241
ActiveWindow.ScrollRow = 243
ActiveWindow.ScrollRow = 245
ActiveWindow.ScrollRow = 248
ActiveWindow.ScrollRow = 250
ActiveWindow.ScrollRow = 251
ActiveWindow.ScrollRow = 253
ActiveWindow.ScrollRow = 254
ActiveWindow.ScrollRow = 257
ActiveWindow.ScrollRow = 259
ActiveWindow.ScrollRow = 260
ActiveWindow.ScrollRow = 262
ActiveWindow.ScrollRow = 263
ActiveWindow.ScrollRow = 265
ActiveWindow.ScrollRow = 266
ActiveWindow.ScrollRow = 268
ActiveWindow.ScrollRow = 269
ActiveWindow.ScrollRow = 270
ActiveWindow.ScrollRow = 271
ActiveWindow.ScrollRow = 272
ActiveWindow.ScrollRow = 274
ActiveWindow.ScrollRow = 275
ActiveWindow.ScrollRow = 277
ActiveWindow.ScrollRow = 279
ActiveWindow.ScrollRow = 280
ActiveWindow.ScrollRow = 283
ActiveWindow.ScrollRow = 284
ActiveWindow.ScrollRow = 286
ActiveWindow.ScrollRow = 287
ActiveWindow.ScrollRow = 288
ActiveWindow.ScrollRow = 291
ActiveWindow.ScrollRow = 293
ActiveWindow.ScrollRow = 294
ActiveWindow.ScrollRow = 295
ActiveWindow.ScrollRow = 297
ActiveWindow.ScrollRow = 298
ActiveWindow.ScrollRow = 300
ActiveWindow.ScrollRow = 302
ActiveWindow.ScrollRow = 303
ActiveWindow.ScrollRow = 304
ActiveWindow.ScrollRow = 305
ActiveWindow.ScrollRow = 306
ActiveWindow.ScrollRow = 308
ActiveWindow.ScrollRow = 309
ActiveWindow.ScrollRow = 310
ActiveWindow.ScrollRow = 311
ActiveWindow.ScrollRow = 312
ActiveWindow.ScrollRow = 313
ActiveWindow.ScrollRow = 314
ActiveWindow.ScrollRow = 315
ActiveWindow.ScrollRow = 317
ActiveWindow.ScrollRow = 318
ActiveWindow.ScrollRow = 319
ActiveWindow.ScrollRow = 320
ActiveWindow.ScrollRow = 321
ActiveWindow.ScrollRow = 322
ActiveWindow.ScrollRow = 323
ActiveWindow.ScrollRow = 325
ActiveWindow.ScrollRow = 327
ActiveWindow.ScrollRow = 329
ActiveWindow.ScrollRow = 331
ActiveWindow.ScrollRow = 332
ActiveWindow.ScrollRow = 334
ActiveWindow.ScrollRow = 335
ActiveWindow.ScrollRow = 336
ActiveWindow.ScrollRow = 337
ActiveWindow.ScrollRow = 338
ActiveWindow.ScrollRow = 339
ActiveWindow.ScrollRow = 340
ActiveWindow.ScrollRow = 342
ActiveWindow.ScrollRow = 343
ActiveWindow.ScrollRow = 344
ActiveWindow.ScrollRow = 345
ActiveWindow.ScrollRow = 346
ActiveWindow.ScrollRow = 347
ActiveWindow.ScrollRow = 348
ActiveWindow.ScrollRow = 349
ActiveWindow.ScrollRow = 351
ActiveWindow.ScrollRow = 352
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 354
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 352
ActiveWindow.ScrollRow = 351
ActiveWindow.ScrollRow = 349
ActiveWindow.ScrollRow = 348
ActiveWindow.ScrollRow = 347
Range('L358').Select
ActiveSheet.Paste
ActiveWindow.ScrollRow = 348
ActiveWindow.ScrollRow = 349
ActiveWindow.ScrollRow = 351
ActiveWindow.ScrollRow = 352
ActiveWindow.ScrollRow = 353
ActiveWindow.ScrollRow = 354
ActiveWindow.ScrollRow = 355
ActiveWindow.ScrollRow = 356
ActiveWindow.ScrollRow = 357
ActiveWindow.ScrollRow = 359
ActiveWindow.ScrollRow = 360
ActiveWindow.ScrollRow = 361
ActiveWindow.ScrollRow = 362
ActiveWindow.ScrollRow = 363
ActiveWindow.ScrollRow = 364
ActiveWindow.ScrollRow = 365
ActiveWindow.ScrollRow = 366
ActiveWindow.ScrollRow = 368
ActiveWindow.ScrollRow = 369
ActiveWindow.ScrollRow = 370
ActiveWindow.ScrollRow = 371
ActiveWindow.ScrollRow = 372
ActiveWindow.ScrollRow = 373
ActiveWindow.ScrollRow = 374
ActiveWindow.ScrollRow = 376
ActiveWindow.ScrollRow = 377
ActiveWindow.ScrollRow = 378
ActiveWindow.ScrollRow = 379
ActiveWindow.ScrollRow = 380
ActiveWindow.ScrollRow = 381
ActiveWindow.ScrollRow = 382
ActiveWindow.ScrollRow = 383
ActiveWindow.ScrollRow = 385
ActiveWindow.ScrollRow = 386
ActiveWindow.ScrollRow = 387
ActiveWindow.ScrollRow = 388
ActiveWindow.ScrollRow = 389
ActiveWindow.ScrollRow = 390
ActiveWindow.ScrollRow = 391
ActiveWindow.ScrollRow = 393
ActiveWindow.ScrollRow = 394
ActiveWindow.ScrollRow = 395
ActiveWindow.ScrollRow = 396
ActiveWindow.ScrollRow = 397
ActiveWindow.ScrollRow = 398
ActiveWindow.ScrollRow = 399
ActiveWindow.ScrollRow = 400
ActiveWindow.ScrollRow = 402
ActiveWindow.ScrollRow = 403
ActiveWindow.ScrollRow = 404
ActiveWindow.ScrollRow = 405
ActiveWindow.ScrollRow = 406
ActiveWindow.ScrollRow = 407
ActiveWindow.ScrollRow = 408
ActiveWindow.ScrollRow = 410
ActiveWindow.ScrollRow = 411
ActiveWindow.ScrollRow = 412
ActiveWindow.ScrollRow = 413
ActiveWindow.ScrollRow = 414
ActiveWindow.ScrollRow = 415
ActiveWindow.ScrollRow = 416
ActiveWindow.ScrollRow = 417
ActiveWindow.ScrollRow = 419
ActiveWindow.ScrollRow = 420
ActiveWindow.ScrollRow = 421
Sheets('originalfeuilgarde').Select
ActiveWindow.SmallScroll Down:=69
Range('R430:V434').Select
Application.CutCopyMode = False
Selection.Copy
Sheets('1janvier ').Select
Range('R430:V430').Select
ActiveSheet.Paste
Sheets('originalfeuilgarde').Select
Range('AD433:AH434').Select
Application.CutCopyMode = False
Selection.Copy
Sheets('1janvier ').Select
Range('AD433:AH434').Select
ActiveSheet.Paste
ActiveWindow.SmallScroll Down:=6
Sheets('originalfeuilgarde').Select
Range('L436:AI479').Select
Application.CutCopyMode = False
Selection.Copy
ActiveWindow.ScrollRow = 462
ActiveWindow.ScrollRow = 461
ActiveWindow.ScrollRow = 459
ActiveWindow.ScrollRow = 458
ActiveWindow.ScrollRow = 457
ActiveWindow.ScrollRow = 456
ActiveWindow.ScrollRow = 455
ActiveWindow.ScrollRow = 454
ActiveWindow.ScrollRow = 453
ActiveWindow.ScrollRow = 451
ActiveWindow.ScrollRow = 450
ActiveWindow.ScrollRow = 449
ActiveWindow.ScrollRow = 447
ActiveWindow.ScrollRow = 446
ActiveWindow.ScrollRow = 447
ActiveWindow.ScrollRow = 448
ActiveWindow.ScrollRow = 447
ActiveWindow.ScrollRow = 446
ActiveWindow.ScrollRow = 445
ActiveWindow.ScrollRow = 444
ActiveWindow.ScrollRow = 442
ActiveWindow.ScrollRow = 441
ActiveWindow.ScrollRow = 440
ActiveWindow.ScrollRow = 439
ActiveWindow.ScrollRow = 438
ActiveWindow.ScrollRow = 437
ActiveWindow.ScrollRow = 436
ActiveWindow.ScrollRow = 434
ActiveWindow.ScrollRow = 433
ActiveWindow.ScrollRow = 432
ActiveWindow.ScrollRow = 431
ActiveWindow.ScrollRow = 430
ActiveWindow.ScrollRow = 429
ActiveWindow.ScrollRow = 428
ActiveWindow.ScrollRow = 427
ActiveWindow.ScrollRow = 425
ActiveWindow.ScrollRow = 424
ActiveWindow.ScrollRow = 423
ActiveWindow.ScrollRow = 421
ActiveWindow.ScrollRow = 420
ActiveWindow.ScrollRow = 419
ActiveWindow.ScrollRow = 417
ActiveWindow.ScrollRow = 416
ActiveWindow.ScrollRow = 417
ActiveWindow.ScrollRow = 419
ActiveWindow.ScrollRow = 420
ActiveWindow.ScrollRow = 421
Sheets('1janvier ').Select
Range('L436:R436').Select
ActiveSheet.Paste
Sheets('originalfeuilgarde').Select
ActiveWindow.ScrollRow = 422
ActiveWindow.ScrollRow = 423
ActiveWindow.ScrollRow = 424
ActiveWindow.ScrollRow = 425
ActiveWindow.ScrollRow = 427
ActiveWindow.ScrollRow = 428
ActiveWindow.ScrollRow = 429
ActiveWindow.ScrollRow = 431
ActiveWindow.ScrollRow = 433
ActiveWindow.ScrollRow = 434
ActiveWindow.ScrollRow = 436
ActiveWindow.ScrollRow = 437
ActiveWindow.ScrollRow = 438
ActiveWindow.ScrollRow = 439
ActiveWindow.ScrollRow = 440
ActiveWindow.ScrollRow = 441
ActiveWindow.ScrollRow = 442
ActiveWindow.ScrollRow = 444
ActiveWindow.ScrollRow = 445
ActiveWindow.ScrollRow = 446
ActiveWindow.ScrollRow = 447
ActiveWindow.ScrollRow = 448
ActiveWindow.ScrollRow = 450
ActiveWindow.ScrollRow = 451
ActiveWindow.ScrollRow = 453
ActiveWindow.ScrollRow = 455
ActiveWindow.ScrollRow = 457
ActiveWindow.ScrollRow = 458
ActiveWindow.ScrollRow = 461
ActiveWindow.ScrollRow = 462
ActiveWindow.ScrollRow = 463
ActiveWindow.ScrollRow = 464
ActiveWindow.ScrollRow = 465
ActiveWindow.ScrollRow = 466
ActiveWindow.ScrollRow = 467
ActiveWindow.ScrollRow = 468
ActiveWindow.ScrollRow = 470
ActiveWindow.ScrollRow = 471
ActiveWindow.ScrollRow = 472
ActiveWindow.ScrollRow = 473
ActiveWindow.ScrollRow = 474
ActiveWindow.ScrollRow = 475
ActiveWindow.ScrollRow = 476
ActiveWindow.ScrollRow = 478
ActiveWindow.ScrollRow = 479
ActiveWindow.ScrollRow = 480
Range('R488:V492').Select
Application.CutCopyMode = False
Selection.Copy
Sheets('1janvier ').Select
ActiveWindow.SmallScroll Down:=54
Range('R488:V492').Select
ActiveSheet.Paste
Sheets('originalfeuilgarde').Select
Range('AD491:AH492').Select
Application.CutCopyMode = False
Selection.Copy
Sheets('1janvier ').Select
Range('AD491:AH492').Select
ActiveSheet.Paste
Sheets('originalfeuilgarde').Select
Range('L494:AI537').Select
Application.CutCopyMode = False
Selection.Copy
Sheets('1janvier ').Select
Range('L494:AI537').Select
ActiveSheet.Paste
ActiveWindow.ScrollRow = 518
ActiveWindow.ScrollRow = 517
ActiveWindow.ScrollRow = 516
ActiveWindow.ScrollRow = 515
ActiveWindow.ScrollRow = 514
ActiveWindow.ScrollRow = 513
ActiveWindow.ScrollRow = 512
ActiveWindow.ScrollRow = 510
ActiveWindow.ScrollRow = 509
ActiveWindow.ScrollRow = 507
ActiveWindow.ScrollRow = 505
ActiveWindow.ScrollRow = 502
ActiveWindow.ScrollRow = 499
ActiveWindow.ScrollRow = 495
ActiveWindow.ScrollRow = 490
ActiveWindow.ScrollRow = 487
ActiveWindow.ScrollRow = 481
ActiveWindow.ScrollRow = 475
ActiveWindow.ScrollRow = 471
ActiveWindow.ScrollRow = 466
ActiveWindow.ScrollRow = 462
ActiveWindow.ScrollRow = 458
ActiveWindow.ScrollRow = 455
ActiveWindow.ScrollRow = 453
ActiveWindow.ScrollRow = 450
ActiveWindow.ScrollRow = 448
ActiveWindow.ScrollRow = 445
ActiveWindow.ScrollRow = 444
ActiveWindow.ScrollRow = 440
ActiveWindow.ScrollRow = 437
ActiveWindow.ScrollRow = 436
ActiveWindow.ScrollRow = 431
ActiveWindow.ScrollRow = 428
ActiveWindow.ScrollRow = 424
ActiveWindow.ScrollRow = 422
ActiveWindow.ScrollRow = 419
ActiveWindow.ScrollRow = 415
ActiveWindow.ScrollRow = 413
ActiveWindow.ScrollRow = 410
ActiveWindow.ScrollRow = 406
ActiveWindow.ScrollRow = 405
ActiveWindow.ScrollRow = 402
ActiveWindow.ScrollRow = 398
ActiveWindow.ScrollRow = 396
ActiveWindow.ScrollRow = 393
ActiveWindow.ScrollRow = 390
ActiveWindow.ScrollRow = 388
ActiveWindow.ScrollRow = 385
ActiveWindow.ScrollRow = 382
ActiveWindow.ScrollRow = 379
ActiveWindow.ScrollRow = 378
ActiveWindow.ScrollRow = 376
ActiveWindow.ScrollRow = 373
ActiveWindow.ScrollRow = 372
ActiveWindow.ScrollRow = 371
ActiveWindow.ScrollRow = 369
ActiveWindow.ScrollRow = 368
ActiveWindow.ScrollRow = 365
ActiveWindow.ScrollRow = 363
ActiveWindow.ScrollRow = 360
ActiveWindow.ScrollRow = 357
ActiveWindow.ScrollRow = 354
ActiveWindow.ScrollRow = 351
ActiveWindow.ScrollRow = 347
ActiveWindow.ScrollRow = 344
ActiveWindow.ScrollRow = 339
ActiveWindow.ScrollRow = 335
ActiveWindow.ScrollRow = 328
ActiveWindow.ScrollRow = 323
ActiveWindow.ScrollRow = 315
ActiveWindow.ScrollRow = 309
ActiveWindow.ScrollRow = 301
ActiveWindow.ScrollRow = 295
ActiveWindow.ScrollRow = 285
ActiveWindow.ScrollRow = 277
ActiveWindow.ScrollRow = 268
ActiveWindow.ScrollRow = 262
ActiveWindow.ScrollRow = 254
ActiveWindow.ScrollRow = 250
ActiveWindow.ScrollRow = 245
ActiveWindow.ScrollRow = 242
ActiveWindow.ScrollRow = 238
ActiveWindow.ScrollRow = 235
ActiveWindow.ScrollRow = 233
ActiveWindow.ScrollRow = 229
ActiveWindow.ScrollRow = 226
ActiveWindow.ScrollRow = 224
ActiveWindow.ScrollRow = 220
ActiveWindow.ScrollRow = 217
ActiveWindow.ScrollRow = 214
ActiveWindow.ScrollRow = 211
ActiveWindow.ScrollRow = 208
ActiveWindow.ScrollRow = 204
ActiveWindow.ScrollRow = 201
ActiveWindow.ScrollRow = 197
ActiveWindow.ScrollRow = 192
ActiveWindow.ScrollRow = 186
ActiveWindow.ScrollRow = 182
ActiveWindow.ScrollRow = 176
ActiveWindow.ScrollRow = 172
ActiveWindow.ScrollRow = 166
ActiveWindow.ScrollRow = 161
ActiveWindow.ScrollRow = 156
ActiveWindow.ScrollRow = 150
ActiveWindow.ScrollRow = 146
ActiveWindow.ScrollRow = 142
ActiveWindow.ScrollRow = 138
ActiveWindow.ScrollRow = 133
ActiveWindow.ScrollRow = 129
ActiveWindow.ScrollRow = 126
ActiveWindow.ScrollRow = 123
ActiveWindow.ScrollRow = 119
ActiveWindow.ScrollRow = 118
ActiveWindow.ScrollRow = 115
ActiveWindow.ScrollRow = 113
ActiveWindow.ScrollRow = 110
ActiveWindow.ScrollRow = 108
ActiveWindow.ScrollRow = 106
ActiveWindow.ScrollRow = 102
ActiveWindow.ScrollRow = 100
ActiveWindow.ScrollRow = 99
ActiveWindow.ScrollRow = 96
ActiveWindow.ScrollRow = 93
ActiveWindow.ScrollRow = 92
ActiveWindow.ScrollRow = 89
ActiveWindow.ScrollRow = 87
ActiveWindow.ScrollRow = 83
ActiveWindow.ScrollRow = 81
ActiveWindow.ScrollRow = 79
ActiveWindow.ScrollRow = 76
ActiveWindow.ScrollRow = 73
ActiveWindow.ScrollRow = 72
ActiveWindow.ScrollRow = 68
ActiveWindow.ScrollRow = 66
ActiveWindow.ScrollRow = 64
ActiveWindow.ScrollRow = 62
ActiveWindow.ScrollRow = 61
ActiveWindow.ScrollRow = 57
ActiveWindow.ScrollRow = 55
ActiveWindow.ScrollRow = 53
ActiveWindow.ScrollRow = 50
ActiveWindow.ScrollRow = 47
ActiveWindow.ScrollRow = 46
ActiveWindow.ScrollRow = 44
ActiveWindow.ScrollRow = 40
ActiveWindow.ScrollRow = 39
ActiveWindow.ScrollRow = 36
ActiveWindow.ScrollRow = 33
ActiveWindow.ScrollRow = 32
ActiveWindow.ScrollRow = 30
ActiveWindow.ScrollRow = 29
ActiveWindow.ScrollRow = 27
ActiveWindow.ScrollRow = 25
ActiveWindow.ScrollRow = 24
ActiveWindow.ScrollRow = 23
ActiveWindow.ScrollRow = 22
ActiveWindow.ScrollRow = 21
ActiveWindow.ScrollRow = 19
ActiveWindow.ScrollRow = 16
ActiveWindow.ScrollRow = 15
ActiveWindow.ScrollRow = 14
ActiveWindow.ScrollRow = 13
ActiveWindow.ScrollRow = 12
ActiveWindow.ScrollRow = 10
ActiveWindow.ScrollRow = 8
ActiveWindow.ScrollRow = 7
ActiveWindow.ScrollRow = 6
ActiveWindow.ScrollRow = 5
Range('A5:K5').Select
Range('K5').Activate
Selection.EntireColumn.Hidden = True
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowInsertingHyperlinks:=True, _
AllowFiltering:=True
Range('W15:AI15').Select
End Sub
 

ERIC S

XLDnaute Barbatruc
re

fichier joint
essaie, procédure 'on error' ajoutée pour ce fichier test qui n'a pas toutes les feuilles

pour le copier coller je le fais de la même façon sur toutes les zones (sauf erreur comme dans ton code)

je ne serai peut-êtr pas là à ton retour mais j esuis en alerte sur ce fil

A+ [file name=miseazeroplanning.zip size=14842]http://www.excel-downloads.com/components/com_simpleboard/uploaded/files/miseazeroplanning.zip[/file]
 

Pièces jointes

  • miseazeroplanning.zip
    14.5 KB · Affichages: 15

Gilles25

XLDnaute Junior
Re
je pense avoir trouver, car la procédure est déja moins longue et de plus elle fonctionne, par contre dans la sécance suivante:
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowInsertingHyperlinks:=True, _
AllowFiltering:=True

Lors de la protection de la feuille, je me retrouve chaque fois avec les cellules marquées 'verrouillées' accessible alors quelle ne devrais pas ?!!, que dois-je changer de true en false
 

ERIC S

XLDnaute Barbatruc
re

je ne vois pas le pb sur mon fichier, vérifie dans ton code que tu es bien sur la feuille nomfichier quand tu protèges et non sur la feuille originale, que les cellules sont bien déclarées verrouillées

sinon en général

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True

suffit sauf si tu souhaites utiliser le filtrage (le mode doit être sélectionné avant la protection de la feuille)

ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFiltering:=True

(pas valable sur XL97 par exemple)


A+
 

Discussions similaires

Statistiques des forums

Discussions
315 093
Messages
2 116 139
Membres
112 669
dernier inscrit
Guigui2502