Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


New Vb Question

  • Please log in to reply
1 reply to this topic

#1 Tbenner019


  • Members
  • 12 posts
  • Local time:03:44 PM

Posted 01 September 2007 - 07:16 AM

So I've been working my tail off trying to complete my senior project and I can't seem to get 1 thing. I'm trying to have the computer anaylze a word, then break it down into letters and assign a recall variable for that word based off an equation I have developed. The only thing I can't get is the letter separation. Any insight? I'm using Visual Basic 2005 Express Edition.

I have no idea how to pull letters out of words, or words out of sentances for analyzing.

BC AdBot (Login to Remove)


#2 MattV


  • Members
  • 736 posts
  • Gender:Male
  • Location:Asheville NC
  • Local time:06:44 PM

Posted 30 September 2007 - 10:06 PM

Search the VB 2005 documentation for string functions. You should find something similar to Left(params), Mid(params), and Right(params).

In VB 6, Left(string, length) will return a substring of string, starting with the first character of string, of length characters.

Right(string, length) does the same thing starting from the last character of string and working backwards for length characters.

Mid(string, start, [length]) will produce a substring of string containing length characters, starting at the character in the position specified by start.

All of these functions will, if the requested substring would be longer than what's available, return everything that is available without causing an error. Something to keep in mind when using them. You can create a working program that produces strange and bizarre results. :flowers:

Since I've only dabbled with VB 2005, I'm not sure if the string functions would be exactly the same, but they should be similar. If they exist. If M$ decided that such useful functions weren't needed... Let's just say that nothing that M$ does surprises me, any more. :thumbsup:

Edited by MattV, 30 September 2007 - 10:09 PM.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users