|
Dim s As String, l As Integer, i As Integer, s2 As String, c As Integer
Private Sub Command1_Click()
s = Text1.Text
l = Len(s)
For i = 1 To l
s2 = Mid(s, i, 1)
If s2 = Chr(13) Then
c = c + 1
End If
Next i
MsgBox "Il sorgente è composto da " & c + 1 & " linee di codice", vbInformation, "Numero linee"
c = 0
End Sub
|
|