|    
			
				30/08/2009, 10:57
			
			
			  | 
  |   |  |  |  |  Fecha de Ingreso: julio-2006 Ubicación: Órbita sincrónica 
						Mensajes: 899
					 Antigüedad: 19 años, 3 meses Puntos: 29 |  | 
  |  Respuesta: Contar renglones en textbox  
  Creo que lo que quieres es que también las cuente al pulsar la tecla de borrar.Y la variable iLineas te sobra.
 
 Private Sub Text2_KeyPress(KeyAscii As Integer)
 ' KeyAscii = Asc(UCase(Chr(KeyAscii))) ' y esto tambien sobra
 If KeyAscii = 13 or KeyAscii = 8 Then
 Label1.Caption = " " & SendMessage(Text2.hWnd, EM_GETLINECOUNT, 0&, ByVal 0&) '
 
 If Label1.Caption > 12 Then Label2.Caption = "2/2"
 If Label1.Caption > 25 Then Label2.Caption = "3/3"
 If Label1.Caption > 38 Then Label2.Caption = "4/4"
 End If
 End Sub
   Última edición por pkj; 30/08/2009 a las 11:05
     |