Multi StrInsert

tcgoh

Active Member
Licensed User
Longtime User
Hi all,

Does anyone know is it possible to have a multiple StrInsert in a single code?

Example:

a=strinsert(textbox1.Text,8,";") + strinsert(textbox1.text,32,";")

Thanks
 

klaus

Expert
Licensed User
Longtime User
Hello tcgoh
Insread of
a=strinsert(textbox1.Text,8,";") + strinsert(textbox1.text,32,";")
this work in VB but not in Basic4PPC

you must use the concatenation character.
a=strinsert(textbox1.Text,8,";")&strinsert(textbox1.text,32,";")

Best regards
Klaus
Switzerland
 

tcgoh

Active Member
Licensed User
Longtime User
Hi Klaus

Thanks for the reply. But your code does work also.

Error: Variable: Textbox was not assigned any value.

Thanks
 

specci48

Well-Known Member
Licensed User
Longtime User
I think you have used copy and paste ... but you haven't removed the space in the second line of the code klaus provided.
There has to be no space between "textbox" and "1" ...


specci48
 

tcgoh

Active Member
Licensed User
Longtime User
Hi Erel,

Oh Ya, there is space there. Thanks.

But Erel is right on the spot on what I wanted. ie, add 2 char on the same line.

Thanks again to all, the second code works fine.
 
Top