0/5 (5 avis)
Snippet vu 3 118 fois - Téléchargée 45 fois
Public Function NTotal(RichTextBoxLigne As String) Dim numLines, Texte numLines = 1 Texte = RichTextBoxLigne Do Apostrophe = InStr(Texte, vbCrLf) If Apostrophe <> 0 Then numLines = numLines + 1 Texte = Mid(Texte, Apostrophe + 1, Len(Texte) - Apostrophe) Else Exit Do End If Loop NTotal = numLines End Function
2 août 2002 à 17:27
Function Lignes(text As String) As Integer
Lignes=UBound(Split(text, vbCrLf)) + 1
End Function
2 août 2002 à 14:58
1 août 2002 à 19:55
1 août 2002 à 19:53
Function Lignes(text As String) As Integer
Dim Start As Integer
Lignes = 0
If text = vbNullString Then Exit Function
Do
Start = InStr(Start + 1, text, vbCrLf)
Lignes = Lignes + 1
DoEvents
Loop While Not Start = 0
End Function
1 août 2002 à 19:34
Vous n'êtes pas encore membre ?
inscrivez-vous, c'est gratuit et ça prend moins d'une minute !
Les membres obtiennent plus de réponses que les utilisateurs anonymes.
Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.
Le fait d'être membre vous permet d'avoir des options supplémentaires.