*Hi guys...I am currently working on a really basic scripting langauge that gets the first 4 letters of a textbox's content (in a Windows Form project) and compares it to a in-program list of keywords and then uses the remaining characters to form an argument to the keywords...
I was wondering weather you had some code ideas on how to go about placing the first 4 letters in one variable and then the remaining characters into another.

My langauge will be single command.. i.e you will only be able to run one command per program.

Thanks*

Sorry guys, I apologise for the beginner question...This is my answer

Dim codefunction As String
Dim intxtbox As String
intxtbox=TextBox1.Text
codefunction=Left(intxtbox, intxtbox.length -4)

I am yet to test this so please tell me if the code would be incorrect!

SORRY THE ABOVE CODE IS INCORRECT

Left() is for intergrs only...

The Left function you're looking for isn't there anymore, but each string has a substring method, that basically combines the functionality of Left, Right and Mid from VB6, that will do the job:

codefunction=intxtbox.Substring(0, 4)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.