J'essaie d'appeler un sous-set dans ma principale et je remplis essentiellement une autre colonne avec cette sous-catégorie. Mais je reçois une erreur de syntaxe. Pourquoi est-ce?
Option Explicit Private Sub Form_Load() Dim myssortingng As Ssortingng, i As Long, asciinum As Ssortingng, f As Long With Worksheets("sheet1") For f = 2 To .Cells(.Rows.Count, "I").End(xlUp).Row myssortingng = .Cells(f, "I").Value2 prueba1 (myssortingng, f) Next f End With End Sub Sub prueba1(myssortingng, index As Long) Dim i As Long, asciinum As Ssortingng For i = 1 To Len(myssortingng) asciinum = LCase(Mid(myssortingng, i, 1)) If asciinum Like "[aeiou]" Then .Cells(index, "M") = "First Vowel " + asciinum Exit For End If Next i End Sub
prueba1 (myssortingng, f)
doit être prueba1 myssortingng, f
prueba1(myssortingng, index As Long)
doit être prueba1(myssortingng AS STRING, index As Long)
.Cells
au lieu de Cells
. Au minimum, il devrait s'agir de Worksheets("sheet1").Cells(index, "M") = "First Vowel " + asciinum