w = Mid(sFrase, 1, h)
Buenas, el error simplemente está en la función Mid.Claro lo tenia al reves gracias a todos por resopnder .Código: TextMid(Frase,h,1) en vez de Mid(Frase, 1, h)
Mid(Frase, Inicio, Cuantos) Código: Text
Private Sub CmdCalc_Click() Dim iCont As Integer Dim sFrase As String Dim x, h, w x = Len(TxtWord.Text) sFrase = TxtWord.Text For h = 1 To x w = Mid(sFrase, h, 1) If w = " " Then iCont = iCont + 1 End If Next h MsgBox iCont End Sub
Saludos, :P
PD: Juanolo se me ha adelantao por 1 minuto xD. Bueno, aún así lo dejo..