My guess is that the Procedure is too large and has exceeded some internal limit
As a possible work-around you might take
Function NomJourSemaineTrip$(Optional fecha As Date, Optional ChxLangue As Byte, Optional NomLangue As Byte, Optional NbItems As Boolean = False, Optional transcription As Boolean = False, Optional LangueBase As Byte)
and split it by LangueBase and call call 2 different functions with 1 to 100 in one, and 101 to 182 in the other
Function NomJourSemaineTrip$(Optional fecha As Date, Optional ChxLangue As Byte, Optional NomLangue As Byte, Optional NbItems As Boolean = False, Optional transcription As Boolean = False, Optional LangueBase As Byte)
If LangueBase <= 100 Then
NomJourSemaineTrip100 (.....)
Else
NomJourSemaineTrip101 (.....)
End If