Option Base 1
Public Const id_focus_rien As Integer = 1
Public Function MaFonctionQuiPete()
Dim ListIndex(1, 3) As Variant, myString As String
ListIndex(1, 1) = 100
ListIndex(1, 2) = id_focus_rien
myString = GetFocusName(1) 'OK
myString = GetFocusName(id_focus_rien) 'OK
myString = GetFocusName(ListIndex(1, 2)) '(1) KO
ListIndex(1, 3) = myString
MaFonctionQuiPete = ListIndex
End Function
Private Function GetFocusName(myId As Integer)
If myId = 1 Then
GetFocusName = "rien"
ElseIf myId = 2 Then
GetFocusName = "quelque chose"
End If
End Function