Erreur 91 Urgent SVP

thugiba3

XLDnaute Nouveau
Bonjour,

Je viens solliciter votre aide.

J'ai l'erreur 91 "variable objet ou variable de bloc With non définie"

Voici mon code:

Sub Merge_cells()

Dim i As Integer
Dim Cells As Range
Dim Selection As Range
Dim A As Integer
Dim B As Integer

For i = 4 To 10 Step 1

A = Cells(6, i).Value
B = Cells(6, i + 1).Value

If A = B Then
Range(Cells(6, i), Cells(6, i + 1)).Select
Selection.MergeCells = True
End If

i = i + 1

Next

End Sub


Merci d'avance
 

Discussions similaires

Réponses
6
Affichages
239

Statistiques des forums

Discussions
312 196
Messages
2 086 101
Membres
103 116
dernier inscrit
kutobi87