Victor Charles
asked on
Help with copying partial data from textbox2 to textbox1 using vb.net
Hi,
How do you remove the first 4 characters in textbox2 and copy them to textbox1 using vb.net?
Thanks,
Victor
How do you remove the first 4 characters in textbox2 and copy them to textbox1 using vb.net?
Thanks,
Victor
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you, will try both solutions and reply tomorrow.
@Fernando.
Same thing as what I suggested an hour and a half ago. You simply used a shortened syntax that I never use, because I want consistencies in the syntax whether I am retrieving data at the start, the end or in the middle of a string.
Same thing as what I suggested an hour and a half ago. You simply used a shortened syntax that I never use, because I want consistencies in the syntax whether I am retrieving data at the start, the end or in the middle of a string.
@James, yes I agree. ;=)
ASKER
Thank You!
ASKER
Hi,
How do I check if the first four characters in textbox2 are +\-999 (i.e +056 or -056) ? I need to transfer the data to text box1 only if this condition applies.
Thanks,
Victor
How do I check if the first four characters in textbox2 are +\-999 (i.e +056 or -056) ? I need to transfer the data to text box1 only if this condition applies.
Thanks,
Victor
Not tested (sorry, no time)
If (TextBox2.Text.Substring(0 , 1) = "+" OrElse TextBox2.Text.Substring(0, 1)="-" ) AndAlso IsNumeric(TextBox2.Text.Su bstring(1, 3))
If (TextBox2.Text.Substring(0
ASKER
Thank You.
ASKER
How do you delete the first 4 characters in textbox2 aftet you copy them to textbox1?
Thanks,
Victor