I think my message to you is being blocked by a spam filter in groupwise?

this was what I wrote

I might be not getting what you want
this is what your code gives:

AAAAAAAAAAAAAAAAAAAABBBBBBBBBBBBBBBBB222222CCCCCCCCCCCCCCCCCCC111111DDDD DDDDDDDDDDDDDD


I understood you wanted this

AAAAAAAAAAAAAAAAAAAA111111BBBBBBBBBBBBBBBBBB222222CCCCCCCCCCCCC333333 etc

Maybe you could elaborate on what's needed? Do you just need to replace one instance of the 111111 by a given other number?

BArt




On 4-sep-06, at 23:20, RBNUBE wrote:

I had thought about using an array and then splitting it, but it shreds the string into pieces and removes the delimiter which then has to be added back to the string in the correct places and replaced at the correct location.

I am able to use this by extending your code as below, but I was hoping
there would be something simpler and possibly more efficient.

Thanks for the example! Is there any way to improve it or the extended
version below?


I took your example and extended it to this:
  Dim aString As String
  Dim arString() As String
  Dim theFinalString as String
  Dim i as Integer

  aString =
"AAAAAAAAAAAAAAAAAAAA111111BBBBBBBBBBBBBBBBB111111CCCCCCCCCCCCCCCCCCC1 11111D
DDDDDDDDDDDDDDDDD"
  arString = Split(aString,"111111")

  For i = 0 to UBound(arString)
    If i = 1 then
      theFinalString = theFinalString + arString(i) + "222222"
    ElseIf i > 1 and i <> UBound(arString) then
      theFinalString = theFinalString + arString(i) + "111111"
    Else
      theFinalString = theFinalString + arString(i)
    End If
  Next

  MsgBox theFinalString


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to