RE:Función o proc. contar palabras
espero esa funcion te sirva ... solo debes tener dos cajas de texto y copiar todo este codigo, nada mas
Private Sub Text1_Change()
Text2.Text = Val(contar(Text1.Text))
End Sub
Private Function contar(texto As String) As Integer
Dim cont As Integer, a As String
cont = 0
a = ""
While (Left(texto, 1) = " ") And (Len(texto) > 0)
texto = Right(texto, Len(texto) - 1)
Wend
While Len(texto) > 0
If Left(texto, 1) = " " Then
cont = cont + 1
End If
a = texto
texto = Right(texto, Len(texto) - 1)
Wend
If (a <> "") Then
cont = cont + 1
End If
If a = " " Then
cont = cont - 1
End If
contar = cont
End Function