Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, _ lParam As Any) As Long Public Const EM_GETLINECOUNT = &HBA
Public Function TextBoxLineCnt(ctl As TextBox) As Long TextBoxLineCnt = SendMessage(ctl.hwnd, EM_GETLINECOUNT, 0, 0) End Function