Computers & Internet Logo

Related Topics:

Anonymous Posted on Feb 27, 2008

Program can you help me to make my vb project run? my problem is "what code shall i use in displaying number of words as i enter a sentence" thank you..your code can help a lot to run my program.. god bless...

1 Answer

Anonymous

Level 1:

An expert who has achieved level 1.

  • Contributor 1 Answer
  • Posted on Feb 28, 2008
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Sep 17, 2007
Answers
1
Questions
0
Helped
120
Points
1

Sub aa()
'
' aa Macro
'
'
Dim a As String
a = "how are you this is dharani"
Dim leng, cnt As Integer
leng = 1
cnt = 0
While leng <= Len(RTrim(a))
If Mid(a, leng, 1) = " " Then
cnt = cnt + 1
End If
leng = leng + 1
Wend
If Len(RTrim(a)) > 0 Then
cnt = cnt + 1
End If
MsgBox Str(cnt) + " Words"
End Sub

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

130 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

ADMIN Andrew
ADMIN Andrew

Level 3 Expert

73810 Answers

ADMIN Eric
ADMIN Eric

Level 3 Expert

42246 Answers

Brad Brown

Level 3 Expert

19190 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...