macro variable dans range

tibibs

XLDnaute Nouveau
bonjour,

je ne comprends pas pourquoi mon "set range(li_ent)" me donne une erreur de valeur... :/

Code:
Function testab(r As Range) As String
Dim tabl() As String
Dim li_ent As String
Dim i As Integer
Dim c As Range

tabl = Split(r, ",")
For i = 0 To UBound(tabl)
    If i = 0 Then
    li_ent = Chr(34) & "A" & tabl(i)
    Else
    li_ent = li_ent & Chr(59) & "A" & tabl(i)
    End If
Next i
li_ent = li_ent & Chr(34)

Set c = Range(li_ent)
testab = li_ent


End Function

li_ent est égal a
"A2;A3;A4;A5"

merci d'avance
 

Discussions similaires

Statistiques des forums

Discussions
312 377
Messages
2 087 743
Membres
103 657
dernier inscrit
chaval