String Content

Results 1 to 2 of 2

Thread: String Content

  1. #1
    Join Date
    Dec 1969

    Default String Content

    If I want to take a string and insert characters into certain positions, how would I do it.<BR><BR>Str = "ABCDEFGH"<BR><BR>The format will always be:<BR>ABCDE-FG-H<BR><BR>Starting from the right, there will always be 1 character be fore the dash, and the 2 more characters before the dash, but the amount of numbers at the beginning may vary. So I need to start checking the length from the right........the insert at the next position, and the the next 2 positions, etc.......<BR><BR>Please explain.

  2. #2
    Join Date
    Dec 1969

    Default RE: String Content

    mystr = left(mystr,len(mystr)-3) & "-" & mid(mystr,len(mystr)-3,2) & "-" & right(mystr,1)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts