I have a problem with using substring.
I need to fill up a field which allows only 100 characteristics, let’s say this variable is called MyText.
I have gotten this MyText from another website A and created an excel table, from which I fill up the information to another website B. However, some of the information MyText gotten from this website A is over 100 characters and B field allows only 100 characters at maximum. I’ve been using two assigns, first will change the text from website A into a right format:
MyText = MyText.Replace("MyText: ", “”).ToString
and the another is
MyText = MyText.Substring(0, 99)
And is supposed to cut this text in length of 100 characters.
However, it won’t work out. This is the error message I get:
Assign: Index and length must refer to a location within the string.
Parameter name: length
I feel like I’ve tried everything: does anybody know how to solve this problem?