How would I use instr and other such functions in a form. Whenever I try it get errors such as 'InStr' is not a member of 'String'
Thanks,
Mat
Using instr and other functions like it
Using instr and other functions like it
You can use String.IndexOf() method to replace the InStr function.
You should be able to use any of the string functions to manipulate a string like Substring, Trim, LastIndexOf etc..
You should be able to use any of the string functions to manipulate a string like Substring, Trim, LastIndexOf etc..
Using instr and other functions like it
If I do something like this:
dim sample as string = "12-34"
textbox1.text = Instr(sample, "-")
I get this as an error: "Name 'Instr' is not declared."
dim sample as string = "12-34"
textbox1.text = Instr(sample, "-")
I get this as an error: "Name 'Instr' is not declared."
Using instr and other functions like it
To use the old VB functions you will need to switch to your Code Tab and add the following line to the end of the Imports list
Code: Select all
Imports Microsoft.VisualBasic
Using instr and other functions like it
Hey! that worked!
Thanks!!!!
Mat
Thanks!!!!
Mat