sans savoir exactement comment vous procédez....
Comment est déclarée la variable, comment est-elle passée à la fonction...?
deux solutions possibles qui fonctionnent:
S1
au niveau Userform :
Private Sub UserForm_Initialize()
Set MonForm = Me
Label1.ControlTipText = bulleL(1)
Label2.ControlTipText = bulleL(2)
End Sub
au niveau module :
Public MonForm As UserForm
Function bulleL(lab As Integer) As String
bulleL = "mon controlTipText personnalisé" & MonForm.Controls("Label" & lab).Caption & "la suite..."
End Function
S2
au niveau Userform :
Private Sub UserForm_Initialize()
Label1.ControlTipText = bulleL(1, Me)
Label2.ControlTipText = bulleL(2, Me)
End Sub
au niveau module :
Function bulleL(lab As Integer, MonForm As UserForm) As String
bulleL = "mon controlTipText personnalisé" & MonForm.Controls("Label" & lab).Caption & "la suite..."
End Function
A+