Je souhaite reporter une serie de nombre dans les colonnes identifiées sous la forme: Texte = "3,5,8,9,12,17".
Le contenu du TEXTE peut changer de façon dynamique.
Lorsque j’exécute la macro : Message Erreur exécution '13
Ci-dessous la macros
VB:
Dim Plage As Range, i As Integer, Texte As String
Dim Col()
Texte = "3,5,8,9,12,17"
Col = Split(Texte, ",")
For i = 0 To UBound(Col)
Cells(2, Col(i)) = i
Next i
Sub test()
Dim Plage As Range, i As Integer, Texte As String, Col
Texte = "3,5,8,9,12,17"
Col = Split(Texte, ",")
For i = 0 To UBound(Col)
Cells(2, Val(Col(i))) = i
Next i
End Sub
Sub test()
Dim Plage As Range, i As Integer, Texte As String, Col
Texte = "3,5,8,9,12,17"
Col = Split(Texte, ",")
For i = 0 To UBound(Col)
Cells(2, Val(Col(i))) = i
Next i
End Sub
Sub test()
Dim Plage As Range, i As Integer, Texte As String, Col
Texte = "3,5,8,9,12,17"
Col = Split(Texte, ",")
For i = 0 To UBound(Col)
Cells(2, Val(Col(i))) = i
Next i
End Sub