Page 1 of 2 12 LastLast
Results 1 to 40 of 50

Thread: Text Manipulation

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Text Manipulation

    I have a list of text. Each line in the list is a string, then ZZZ then a string. What I want is to cut out from the beginning of the line up to and including ZZZ. Then I want to replace the letter K in each string with J. How would I do this?
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Give me an example of the string.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    blahkblahXXX bbbbbbbbbbb

    This obviously isnt the real string but its like it will be. So I wanna cut from the beinning to XXX including it. Then make the k a j.
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    *bump*
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  5. #5
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Try something like this
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim strString As String
    3. strString = "blahkblahXXX bbbbbbbbbbb"
    4. strString = Replace(strString, "k", "j")
    5. strString = Replace(strString, "X", "")
    6. MsgBox strString
    7. End Sub

  6. #6
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Text Manipulation

    Try this:

    VB Code:
    1. Dim sText As String
    2.    
    3.     sText = Replace(Split("blahkblahXXX bbbbbbbbbbb", "XXX")(0) & "XXX", "k", "j")
    4.     Debug.Print (sText)

  7. #7

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    I need to cut of the rest of the string. Starting with the space to the end.
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    I need to cut of the rest of the string. Starting with the space to the end.
    One modification
    VB Code:
    1. Private Sub Command1_Click()
    2. Dim strString As String
    3. Dim arrString() As String
    4. strString = "blahkblahXXX bbbbbbbbbbb"
    5. strString = Replace(strString, "k", "j")
    6. strString = Replace(strString, "X", "")
    7. arrString = Split(strString, " ")
    8. MsgBox arrString(0)
    9. End Sub

  9. #9

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    This is all getting confusing. Lemme just explain what I have. I wanna load a list which lines will resemble this :

    email(AT)hotmail.com Fargo, Nd Blah

    I wanna load the list. Take that excess at the end away. And change (AT) to @. Here is what I have :

    VB Code:
    1. Private Sub cmdStart_Click()
    2. 'load names
    3. Dim strBuff As String
    4.     'Clear the ListBox contents
    5.     List1.Clear
    6.  
    7.     intFF = FreeFile
    8.  
    9.     Open App.Path & "\load.txt" For Input As #intFF
    10.         Do Until EOF(1)
    11.             Line Input #intFF, strBuff
    12.             List1.AddItem strBuff
    13.         Loop
    14.     Close #intFF
    15. Label3.BackColor = &HFF00&
    16. 'remove excess
    17. Label4.BackColor = &HFF00&
    18. 'replace text
    19. Dim strString As String
    20.         For intIdx = 0 To intCount
    21.             strString = List1.Selected(intIdx)
    22.             strString = Replace(strString, "(at)", "@")
    23.             List1.Selected(intIdx) = strString
    24.         Next
    25. Label5.BackColor = &HFF00&
    26. 'save new file
    27. Dim intCount As Integer
    28. Dim intIdx As Integer
    29.     intCount = List2.ListCount - 1
    30.  
    31.     Open App.Path & "\result.txt" For Output As #1
    32.         For intIdx = 0 To intCount
    33.             If List1.Selected(intIdx) Then Print #1, List1.List(intIdx)
    34.         Next
    35.     Close #1
    36. Label6.BackColor = &HFF00&
    37. End Sub
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  10. #10
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    You can use Split to get rid of the rest (your Replace looks fine)
    VB Code:
    1. Dim strString As String
    2. Dim arrString As String
    3.         For intIdx = 0 To intCount
    4.             strString = List1.Selected(intIdx)
    5.             strString = Replace(strString, "(at)", "@")
    6.             arrString = Split(strString, " ")
    7.             List1.Selected(intIdx) = arrString(0)
    8.         Next
    That should work.

  11. #11
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Text Manipulation

    Did you try the example I posted before?
    VB Code:
    1. For intIdx = 0 To intCount
    2.         strString = List1.Selected(intIdx)
    3.         strString = Replace(Split(strString, " ")(0), "(at)", "@", , , vbTextCompare)
    4.         List1.Selected(intIdx) = strString
    5.     Next

  12. #12

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    Error "Expected array" on arrString(0)
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  13. #13

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    So I used the second one. But its not working... It says its dont but doesnt write to file :

    VB Code:
    1. Private Sub cmdStart_Click()
    2. 'load names
    3. Dim strBuff As String
    4.     'Clear the ListBox contents
    5.     List1.Clear
    6.  
    7.     intFF = FreeFile
    8.  
    9.     Open App.Path & "\load.txt" For Input As #intFF
    10.         Do Until EOF(1)
    11.             Line Input #intFF, strBuff
    12.             List1.AddItem strBuff
    13.         Loop
    14.     Close #intFF
    15. Label3.BackColor = &HFF00&
    16. 'remove excess
    17.     For intIdx = 0 To intCount
    18.         strString = List1.Selected(intIdx)
    19.         strString = Replace(Split(strString, " ")(0), "(at)", "@", , , vbTextCompare)
    20.         List1.Selected(intIdx) = strString
    21.     Next
    22. Label4.BackColor = &HFF00&
    23. 'replace text
    24. Label5.BackColor = &HFF00&
    25. 'save new file
    26.     intCount = List1.ListCount - 1
    27.  
    28.     Open App.Path & "\emails.txt" For Output As #1
    29.         For intIdx = 0 To intCount
    30.             If List1.Selected(intIdx) Then Print #1, List1.List(intIdx)
    31.         Next
    32.     Close #1
    33. Label6.BackColor = &HFF00&
    34. End Sub
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  14. #14
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    Error "Expected array" on arrString(0)
    Thats because I'm moron.

    You need to change
    VB Code:
    1. Dim arrString As String
    2. 'change to
    3. Dim arrString() As String
    Sorry 'bout that.

  15. #15

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    No prob lol. So it's not saving right now..

    VB Code:
    1. Private Sub cmdStart_Click()
    2. 'load names
    3. Dim strBuff As String
    4.     'Clear the ListBox contents
    5.     List1.Clear
    6.  
    7.     intFF = FreeFile
    8.  
    9.     Open App.Path & "\load.txt" For Input As #intFF
    10.         Do Until EOF(1)
    11.             Line Input #intFF, strBuff
    12.             List1.AddItem strBuff
    13.         Loop
    14.     Close #intFF
    15. Label3.BackColor = &HFF00&
    16. 'remove excess
    17. Dim strString As String
    18. Dim arrString() As String
    19.         For intIdx = 0 To intCount
    20.             strString = List1.Selected(intIdx)
    21.             strString = Replace(strString, "(at)", "@")
    22.             arrString = Split(strString, " ")
    23.             List1.Selected(intIdx) = arrString(0)
    24.         Next
    25. Label4.BackColor = &HFF00&
    26. 'replace text
    27. Label5.BackColor = &HFF00&
    28. 'save new file
    29.     intCount = List1.ListCount - 1
    30.  
    31.     Open App.Path & "\emails.txt" For Output As #1
    32.         For intIdx = 0 To intCount
    33.             If List1.Selected(intIdx) Then Print #1, List1.List(intIdx)
    34.         Next
    35.     Close #1
    36. Label6.BackColor = &HFF00&
    37. End Sub

    It doesnt save anything.
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  16. #16
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    As you loop through the listbox are items selected?

    If not, then If List1.Selected(intIdx) will always equal False which means your Print code will never execute.

  17. #17
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    So I used the second one. But its not working... It says its dont but doesnt write to file :

    VB Code:
    1. [SNIP]
    2. 'save new file
    3.     intCount = List1.ListCount - 1
    4.  
    5.     Open App.Path & "\emails.txt" For Output As #1
    6.         For intIdx = 0 To intCount
    7.             If List1.Selected(intIdx) Then Print #1, List1.List(intIdx)
    8.         Next
    9.     Close #1
    10. Label6.BackColor = &HFF00&
    11. End Sub
    Replace the #1 with your intFF variable, and assign it to Freefile again. It's possible that the filehandle isn't available because you closed it so recently.

  18. #18

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    Say what?
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  19. #19
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Text Manipulation

    VB Code:
    1. intFF = FreeFile
    2.     intCount = List1.ListCount - 1
    3.  
    4.     Open App.Path & "\emails.txt" For Output As #intFF
    5.         For intIdx = 0 To intCount
    6.             If List1.Selected(intIdx) Then Print #intFF, List1.List(intIdx)
    7.         Next
    8.     Close #intFF

  20. #20

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    Doesnt work :

    VB Code:
    1. Private Sub cmdStart_Click()
    2. 'load names
    3. Dim strBuff As String
    4.     'Clear the ListBox contents
    5.     List1.Clear
    6.  
    7.     intFF = FreeFile
    8.  
    9.     Open App.Path & "\load.txt" For Input As #intFF
    10.         Do Until EOF(1)
    11.             Line Input #intFF, strBuff
    12.             List1.AddItem strBuff
    13.         Loop
    14.     Close #intFF
    15. Label3.BackColor = &HFF00&
    16. 'remove excess
    17. Dim strString As String
    18. Dim arrString() As String
    19.         For intIdx = 0 To intCount
    20.             strString = List1.Selected(intIdx)
    21.             strString = Replace(strString, "(at)", "@")
    22.             arrString = Split(strString, " ")
    23.             List1.Selected(intIdx) = arrString(0)
    24.         Next
    25. Label4.BackColor = &HFF00&
    26. 'replace text
    27. Label5.BackColor = &HFF00&
    28. 'save new file
    29.         intFF = FreeFile
    30.     intCount = List1.ListCount - 1
    31.  
    32.     Open App.Path & "\emails.txt" For Output As #intFF
    33.         For intIdx = 0 To intCount
    34.             If List1.Selected(intIdx) Then Print #intFF, List1.List(intIdx)
    35.         Next
    36.     Close #intFF
    37. Label6.BackColor = &HFF00&
    38. End Sub
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  21. #21
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Text Manipulation

    Hack is right about the selection BTW, if this is all in one sub then there will never be any selected items because you clear and reload the List. I had thought that you might have combined code from a couple different subs in your post (the Dim statements throughout the code block threw me off).

  22. #22

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    So it now looks like this but still doesnt work :

    VB Code:
    1. Private Sub cmdStart_Click()
    2. loadlist
    3. replace
    4. saveit
    5. End Sub
    6. Private Sub loadlist()
    7. Dim strBuff As String
    8.     'Clear the ListBox contents
    9.     List1.Clear
    10.  
    11.     intFF = FreeFile
    12.  
    13.     Open App.Path & "\load.txt" For Input As #intFF
    14.         Do Until EOF(1)
    15.             Line Input #intFF, strBuff
    16.             List1.AddItem strBuff
    17.         Loop
    18.     Close #intFF
    19. Label3.BackColor = &HFF00&
    20. End Sub
    21. Private Sub replace()
    22. 'remove excess
    23. Dim strString As String
    24. Dim arrString() As String
    25.         For intIdx = 0 To intCount
    26.             strString = List1.Selected(intIdx)
    27.             strString = replace(strString, "(at)", "@")
    28.             arrString = Split(strString, " ")
    29.             List1.Selected(intIdx) = arrString(0)
    30.         Next
    31. Label4.BackColor = &HFF00&
    32. 'replace text
    33. Label5.BackColor = &HFF00&
    34. End Sub
    35. Private Sub saveit()
    36. 'save new file
    37.         intFF = FreeFile
    38.     intCount = List1.ListCount - 1
    39.  
    40.     Open App.Path & "\emails.txt" For Output As #intFF
    41.         For intIdx = 0 To intCount
    42.             If List1.Selected(intIdx) Then Print #intFF, List1.List(intIdx)
    43.         Next
    44.     Close #intFF
    45. Label6.BackColor = &HFF00&
    46. End Sub
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  23. #23
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    After your Replace sub has run, what are the contents of your listbox?

  24. #24

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    I dont know because there is an error in this line

    VB Code:
    1. strString = replace(strString, "(at)", "@")
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  25. #25
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    I dont know because there is an error in this line

    VB Code:
    1. strString = replace(strString, "(at)", "@")
    What is the error?

  26. #26

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    Wrong number of arguments or invalid property assignment on the word replace
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  27. #27
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Well, this was confusing until I released that you can't call a Sub Replace.

    Replace is a VB reserved word, so rename your sub to something like ReplaceString.

  28. #28
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Text Manipulation

    2 things. First, you need to either let the user select items from the list before you output it or just output the whole list. This means you need to load the list seperate from where you output it. Second, you should avoid using VB function names for your own functions. The code you just posted probably won't compile because your replace function doesn't accept arguments and you are calling it recursively. Try this:
    VB Code:
    1. Private Sub cmdStart_Click()
    2.  
    3.     DoReplace
    4.     SaveIt
    5.  
    6. End Sub
    7.  
    8. Private Sub Form1_Load()        'Or where you want to load it.
    9.  
    10.     Dim strBuff As String, intFF As Integer
    11.     List1.Clear
    12.     intFF = FreeFile
    13.  
    14.     Open App.Path & "\load.txt" For Input As #intFF
    15.     Do Until EOF(intFF)
    16.         Line Input #intFF, strBuff
    17.         List1.AddItem strBuff
    18.     Loop
    19.     Close #intFF
    20.    
    21. End Sub
    22.  
    23. Private Sub DoReplace()
    24.  
    25.     Dim intIdx As Integer
    26.    
    27.     For intIdx = 0 To List1.ListCount - 1
    28.         If List1.Selected(intInx) Then
    29.             List1.List(intIdx) = Replace(Split(strString, " ")(0), "(at)", "@", , , vbTextCompare)
    30.         End If
    31.     Next
    32.  
    33. End Sub
    34.  
    35. Private Sub SaveIt()
    36. 'save new file
    37.     Dim intFF As Integer, intIdx As Integer
    38.    
    39.     intFF = FreeFile
    40.  
    41.     Open App.Path & "\emails.txt" For Output As #intFF
    42.     For intIdx = 0 To List1.ListCount - 1
    43.         If List1.Selected(intIdx) Then Print #intFF, List1.List(intIdx)
    44.     Next
    45.     Close #intFF
    46.  
    47. End Sub

  29. #29

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    That code runs without errors but when I check the file it doesnt save. it does create a file called emails.txt if it doesnt exist but theres nothing in it.
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  30. #30
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    That code runs without errors but when I check the file it doesnt save. it does create a file called emails.txt if it doesnt exist but theres nothing in it.
    Now that it runs with no errors, lets get back to my question.

    Before creating emails.txt, do you, in fact, have something in your listbox?

  31. #31

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    Nope
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  32. #32
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    Nope
    Thats why your text file is empty. Your routine dumps the contents of your listbox into your text file. So, the problem is not with your emails.txt routine, it is with the routine that populates your listbox in the first place.

    We are going to step through the process.

    I want you to put a command button on your form (it doesn't matter where, it is going to get deleted after we are done anyway).

    In the command button, call your LoadIt proceed.

    Does your listbox get populated with the contents of load.txt?

    If yes, then take LoadIt out of the click event of your command button and call your replace procedure. Does your listbox get repopulated with the stripped down strings.

  33. #33

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    Yes it loads. When I try and replace it doesnt work. The list is empty
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  34. #34
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    Yes it loads. When I try and replace it doesnt work. The list is empty
    Outstanding. We are making progress.

    I'm going to play with the replace part of the listbox. I'll be back.

  35. #35

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    THank you
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  36. #36

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    Isnt the error in this line

    VB Code:
    1. List1.List(intIdx) = replace(Split(strString, " ")(0), "(AT)", "@", , , vbTextCompare)

    Shouldnt strString be List1.List(intIdx)??
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  37. #37
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Try this. It took a little dickering around, but I think I have it
    VB Code:
    1. On Error Resume Next
    2. Dim strString As String
    3. Dim arrString() As String
    4. Dim i As Long
    5.    For i = 0 To List1.ListCount - 1
    6.        strString = List1.List(i)
    7.        strString = Replace(strString, "(AT)", "@")
    8.        arrString = Split(strString, " ")
    9.        List1.RemoveItem i
    10.        List1.AddItem arrString(0)
    11.    Next
    12. List1.Refresh

  38. #38

    Thread Starter
    Fanatic Member
    Join Date
    Jun 2003
    Location
    Worcester, MA
    Posts
    782

    Re: Text Manipulation

    I put that in the doreplace and it doesnt work
    C#.net, VB, C++, Java, VS 2005/2008
    Dont' forget to rate posts that are helpful to you.

  39. #39
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    I put that in the doreplace and it doesnt work
    It worked for me. What does it do for you?

  40. #40
    Fanatic Member Comintern's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln, NE
    Posts
    826

    Re: Text Manipulation

    Quote Originally Posted by Steve_F
    Isnt the error in this line

    VB Code:
    1. List1.List(intIdx) = replace(Split(strString, " ")(0), "(AT)", "@", , , vbTextCompare)

    Shouldnt strString be List1.List(intIdx)??
    Yep, my bad.

Page 1 of 2 12 LastLast

Posting Permissions

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



Click Here to Expand Forum to Full Width