Propriété avec variable tableau
wil_2638
-
michel_m Messages postés 16602 Date d'inscription Statut Contributeur Dernière intervention -
michel_m Messages postés 16602 Date d'inscription Statut Contributeur Dernière intervention -
bonjour
j'essaye d'apprendre à codé avec des tableaux
j'ai des soucis avec cette partie de mon code, pouvez vous m'aider ?
Rows(i).Font.underligne = True
tableau(i, 2).Font.Color = RGB(192, 32, 255)
Dim tableau()
derniere_ligne = Range("a1").End(xlDown).Row
ReDim tableau(derniere_ligne - 2, 7)
Dim count As Integer
count = 0
'enregistrer le tableau
For i = 0 To derniere_ligne - 2
tableau(i, 0) = Range("a" & i + 2)
tableau(i, 1) = Range("b" & i + 2)
tableau(i, 2) = Range("c" & i + 2)
tableau(i, 3) = Range("d" & i + 2)
tableau(i, 4) = Range("e" & i + 2)
tableau(i, 5) = Range("f" & i + 2)
tableau(i, 6) = Range("g" & i + 2)
tableau(i, 7) = Range("h" & i + 2)
Next
For i = 0 To derniere_ligne - 2
If tableau(i, 2) = "BSCO" Then
count = count + 1
Rows(i).Font.underligne = True
tableau(i, 2).Font.Color = RGB(192, 32, 255)
End If
Next
End Sub
j'essaye d'apprendre à codé avec des tableaux
j'ai des soucis avec cette partie de mon code, pouvez vous m'aider ?
Rows(i).Font.underligne = True
tableau(i, 2).Font.Color = RGB(192, 32, 255)
Dim tableau()
derniere_ligne = Range("a1").End(xlDown).Row
ReDim tableau(derniere_ligne - 2, 7)
Dim count As Integer
count = 0
'enregistrer le tableau
For i = 0 To derniere_ligne - 2
tableau(i, 0) = Range("a" & i + 2)
tableau(i, 1) = Range("b" & i + 2)
tableau(i, 2) = Range("c" & i + 2)
tableau(i, 3) = Range("d" & i + 2)
tableau(i, 4) = Range("e" & i + 2)
tableau(i, 5) = Range("f" & i + 2)
tableau(i, 6) = Range("g" & i + 2)
tableau(i, 7) = Range("h" & i + 2)
Next
For i = 0 To derniere_ligne - 2
If tableau(i, 2) = "BSCO" Then
count = count + 1
Rows(i).Font.underligne = True
tableau(i, 2).Font.Color = RGB(192, 32, 255)
End If
Next
End Sub
A voir également:
- Propriété avec variable tableau
- Tableau word - Guide
- Tableau ascii - Guide
- Trier un tableau excel - Guide
- Tableau croisé dynamique - Guide
- Imprimer tableau excel sur une page - Guide