vendredi 3 novembre 2017

Invalid Qualifier when checking for a specific character in visual basic

Hi i am trying to check for a specific character in visual vba but i encountered the "INVALID QUALIFIER" error when i run my code.

This is my code:

 For i = LBound(rtv) To UBound(rtv) - 1
        If rtv(i).Contains(":") Then
            Value = Split(rtv(i), ":")
            rtv(i) = Chr(34) & Value(0) & Chr(34) & ":" & Chr(34) & Value(1) & Chr(34) & ";"

        Else
            rtv(i) = Chr(34) & rtv(i) & Chr(34) & ":" & Chr(34) & Chr(34)

       ' rtv(i) = Chr(34) & rtv(i) & Chr(34) & ":" & Chr(34) & Chr(34) & ";"
    Next i

The error lies in the IF statement condition but i have no idea what i am doing wrong here. Any help ?

Aucun commentaire:

Enregistrer un commentaire