bonjour,


J'ai un code qui marche bien sauf à un endroit. J'aimerais en fait sélectionner non pas la valeur que me renvoie i mais juste celle qui vient après.

Exemple si i compte 26 lignes alors h = 27.

Mais je n'y arrive pas.???


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
LaDerniere = Worksheets("Base").Cells(6556, 2).End(xlUp).Row
For i = 2 To LaDerniere
h = i + 1
 
If ComboBox2.Value = "" And ComboBox3.Value = "" And ComboBox4.Value = "" Then
K = 4
    If Worksheets("Base").Cells(i, 1) = ComboBox1.Value Then
    Worksheets("Base").Range("B" & i & ":F" & i & "").Copy
    Worksheets("impression").Range("B" & K & "").Select
    ActiveSheet.Paste
    Worksheets("impression").Range("A2") = "Section : " & ComboBox1.Value
    Range("A2").Select
    With Selection.Interior
        .ColorIndex = 40
        .Pattern = xlSolid
    End With
    Worksheets("Base").Range("B1:D1").Copy
    Worksheets("impression").Range("B3:D3").Select
    ActiveSheet.Paste
    Worksheets("Base").Cells(h, 4) = "toto"
 
    K = K + 1
    End If