Bonjour,
J'ai inclus le nom d'une fonction directement dans la liste d'évènements...
Voici la fonction :
Dans la liste évènements (après MAJ), j'ai inscrit :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 Public Function fctNomPropre(strTexte As String) As String Dim nbCar As Integer strTexte = Trim$(strTexte) nbCar = Len(strTexte) fctNomPropre = UCase$(Left(strTexte, 1)) If nbCar > 1 Then For nbCar = 2 To Len(strTexte) If (Mid$(strTexte, nbCar - 1, 1) = " ") _ Or (Mid$(strTexte, nbCar - 1, 1) = "-") _ Or (Mid$(strTexte, nbCar - 1, 1) = ".") _ Or (Mid$(strTexte, nbCar - 1, 1) = ",") _ Or (Mid$(strTexte, nbCar - 1, 1) = "'") Then fctNomPropre = fctNomPropre & UCase$(Mid$(strTexte, nbCar, 1)) Else fctNomPropre = fctNomPropre & LCase$(Mid$(strTexte, nbCar, 1)) End If Next End If End Function
Mais je n'obtiens aucun résultat... J'ai testé la fonction en VBA, aucun souci...=fctNomPropre([TexteEssai])
Ma question, c'est donc : Doit-on obligatoirement passer par VBA pour exécuter une fonction ou ai-je oublié qqch dans l'appel de cette dernière dans les évènements ??
PS (c'est juste pour limiter un peu le code que je passe par les appels évènements...)
Merci d'avance...
Partager