# Visual basic 6.0

Can you send me a code to my program..
this is my problem:
"enter a sentence and determine the number of words present in a particular sentence."
thank you..i hope you can send me the code i need,
thank you...god bless,,,,,,,,

Posted by on

• K-ann Feb 29, 2008

Good morning!

can you send me a code in visual basic 6.0 ?

this is my program:

" enter a sentence and determine how many word are there in a particular sentence"

Thank you very much. Hope that you can send me a code in my problem

God bless you........

×

• Level 1:

An expert who has achieved level 1.

Corporal:

An expert that has over 10 points.

Problem Solver:

An expert who has answered 5 questions.

• Contributor

Below is the code....you can skip the isWord check if you want to count numbers as well. Hope this helps...

Function countWords(str As String) As Long
Dim words() As String, i As Long, numWords As Long
words = Split(str, " ")
For i = LBound(words) To UBound(words)
If isWord(words(i)) Then
numWords = numWords + 1
End If
Next
countWords = numWords
End Function
Function isWord(str As String) As Boolean
Dim ret As Boolean
If str = Null Then
ret = False
ElseIf Len(str) = 0 Then
ret = False
ElseIf Mid(str, 1, 1) >= "A" And Mid(str, 1, 1) <= "Z" Then
ret = True
ElseIf Mid(str, 1, 1) >= "a" And Mid(str, 1, 1) <= "z" Then
ret = True
Else
ret = False
End If
isWord = ret
End Function

Posted on Mar 19, 2008

• Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Sergeant:

An expert that has over 500 points.

Champion:

An expert who has answered 200 questions.

• Expert

Use a compare (instr) command to search the sentence for punctution and spaces. Increment a variable for each word found, resetting the search string and retaining the start position of each find.

Posted on Feb 27, 2008

Hi there,
Save hours of searching online or wasting money on unnecessary repairs by talking to a 6YA Expert who can help you resolve this issue over the phone in a minute or two.

Best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.

Here's a link to this great service

Good luck!

Posted on Jan 02, 2017

×

my-video-file.mp4

×

## Related Questions:

### Do these 4 words mean the same? Say, says, read, reads.

say and says are spoken or oral representations
say is present tense as in now
and says is past tense as in said yesterday
read is visual as in reading a book or paper and is a now tense as I read it now and reads is a past tense operating as he reads the passage very well so the words mean speech in on lot and visual in the others
they can be used in the same sentence as ---I say he reads very well doesn't he or --I said that he read that exactly as it is written
the word read has both past and present tense and it depends on the construction of the sentence as to the determination of that tense

Nov 23, 2017 | The Computers & Internet

### In this sentence choose the word that should be capitalized-- The Chicago symphony is pr sending a Berlioz program this,weekend

'Symphony' as it is part of the name of the orchestra, as in Chicago Symphony Orchestra.

Chicago Symphony is presenting sending a Berlioz program this, weekend

Nov 01, 2016 | Cell Phones

### Do you have a formula in Microsoft Excel that a value can convert to a word...(Ex. 15,000 then it will convert to in words fifteen Thousand..)thanks. need immediate reply.

Hi enelrah_mel0,

You can create a function called SpellNumber using the Visual Basic Editor in the Microsoft Excel to spell the number.

1. Please Open Microsoft Excel. Then press Alt + F11 to open the Visual Basic Editor.
2. Then, click "Insert" option above the Visual Basic Editor window and select "Module".
3. Then, in the Book1 Module1 (Code) window, paste the below code there. (pasted in the next post separately for your convenience)
4. Then, press Alt+Q to close the Visual Basic Editor window.
5. After that, please type the formula " =SpellNumber( * )" in the Excel Sheet and press the Enter Key.
6. Then, save the Excel Sheet.
eg: =SpellNumber(A1)

Where A1 is the first cell in the excel sheet.

Good Luck!

Please post back the result and let me know if you require further assistance.

Thanks for using Fixya.

Oct 29, 2010 | IBM ThinkPad T30 2366 Notebook

### Visual basic 6.0

I am sorry but due to your EULA we cannot provide you with a key for this software. You must contact the publisher for a legally obtained key. FixYa TOS does not allow for us to assist with copies of keys, codes, ids, or software as it is against the law.

Software Counterfeiting
This type of piracy is the illegal duplication and sale of copyrighted material with the intent to directly imitate the copyrighted product. In the case of packaged software, counterfeit versions often include copies of CDs or diskettes containing the software programs, as well as related packaging, manuals, license agreements, labels, registration cards, and security features.

Software Piracy is stealing. If you or your company were caught pirating software, you could be held liable under both civil and criminal law. If a copyright owner brings a civil action against you, the penalties in the U.S. may be up to \$150,000 for each program copied. The U.S. government can also criminally prosecute you. If you are convicted, you can be fined up to \$250,000, sentenced to jail for up to five years, or both.

Jan 14, 2010 | Microsoft Visual Basic 6.0 for PC

### I open a link with word document and I get code execution has been interrupted, and it asks me if I want to debug, stop, clear, and click next on the pop up display.

If this occurs in specific link, the problem must be parametric. Or if it appears in all the link, you should reinstall the word document again and if the problem does not resolve, remove Microsoft Visual Basic Enterprise completely and then check. If it is opening correctly, then reinstall Microsoft Visual Basic Enterprise. If problem appreas again, there must be something fishy in your Visual Basic disk.

Nov 18, 2009 | Microsoft Visual Basic Enterprise Edition...

### Product id of visual studio 6 enterprise edition

Hi,

you can use dummy product id:
112-11111 (second box as many 1's as can)

Thanks.

Mar 17, 2009 | Microsoft Mlf Visual Studio Enterprise...

### Pls. help me

Q.2#  Dim n, sum as Double
Dim i as Integer
n=100
sum=0

for i=1 to n
sum=sum+1/n
next i

Q.3#  Dim sum as Double
sum=0
for i=1 to 99
if i%2 <> 0 then sum=sum+i end if
next i

Sep 16, 2008 | Microsoft AccRepair DS2 2004 for Fr...

### Source code for word count

Haha, i wrote one of thee a while ago for a competition. You need to us e the char at function mate :D
Inside a for loop
Ill havea look for you though :D

Sep 09, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

### Program

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

Feb 27, 2008 | Computers & Internet

### Program

I wrote this as a vbscript. It's Visual Basic code in windows script. If you have XP, just copy the text into notepad and save it as "vowel.vbs". Now double click the newly created script file.

' vowel.vbs
'
' This VBScript is used to count the vowels and consonants in a string.
' Designed and Tested on Windows XP Pro SP2
'
' Version 1.0.0 - 02.20.2008
'
' This code may be freely distributed or modified.
' -----------------------------------------------------------------'

Option Explicit
Dim str
Dim vowels
Dim consonants
Dim i

vowels = 0
consonants = 0
str = "hello"

for i = 1 to len(str)
select case mid(str,i,1)
case "a"
vowels = vowels + 1
case "e"
vowels = vowels + 1
case "i"
vowels = vowels + 1
case "o"
vowels = vowels + 1
case "u"
vowels = vowels + 1
case else
consonants = consonants + 1
end select
next

msgbox "Vowels = " & vowels
msgbox "Consonants = " & consonants
'End of script.

Feb 21, 2008 | Computers & Internet

## Open Questions:

#### Related Topics:

392 people viewed this question

Level 3 Expert

Level 3 Expert