CountLineTxt




Public Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" _
(ByVal hwnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
ByVal lParam As Long) As Long
Public Const EM_GETLINECOUNT = &HBA
'_________________________________________________________


Sub Text1_Change()
Dim lineCount&
On Local Error Resume Next
lineCount& = SendMessageLong(Text1.hwnd, EM_GETLINECOUNT, 0&, 0&)
lblLineCount = Format$(lineCount&, "##,###")
End Sub











( countlinetxt.html )- by Paolo Puglisi - Modifica del 17/12/2023