Affichage d'un tableau dans une MsgBox
Résolu
Harry974
-
Anonyme -
Anonyme -
A voir également:
- Afficher un tableau vba
- Tableau word - Guide
- Trier un tableau excel - Guide
- Tableau ascii - Guide
- Impossible d'afficher le rapport de tableau croisé dynamique sur un rapport existant ✓ - Forum Excel
- Imprimer un tableau excel - Guide
6 réponses
En espérant que ça réponde à ta question,
pour un tableau deux dimensions:
ligne = ""
For i = 1 To 5
frag = ""
For j = 1 To 5
frag = frag & tableau(i, j)
Next j
ligne = ligne & frag & Chr(13)
Next i
MsgBox ligne
Pour un tableau à une dimension c'est plus simple
ligne=""
For i = 1 To 5
ligne = ligne & tableau(i, j) & Chr(13)
Next i
MsgBox ligne
pour un tableau deux dimensions:
ligne = ""
For i = 1 To 5
frag = ""
For j = 1 To 5
frag = frag & tableau(i, j)
Next j
ligne = ligne & frag & Chr(13)
Next i
MsgBox ligne
Pour un tableau à une dimension c'est plus simple
ligne=""
For i = 1 To 5
ligne = ligne & tableau(i, j) & Chr(13)
Next i
MsgBox ligne
pour une dimension, il faut lire:
ligne = ligne & tableau(i) & Chr(13)