|
-
May 28th, 2008, 07:22 AM
#1
Thread Starter
Frenzied Member
[RESOLVED] Remove $ from text
How to remove $ from listbox? I have text like this in my listbox. I want to remove all
AAAAA$,
BBB$
CCC$
ddd$
I want to remove this symbol $ from text to be display like this
AAAAA,
BBB
CCC
ddd
Code:
For i = 0 To List1.ListCount - 1 'select sheet
If List1.Selected(i) = True Then
Dim sheet As String
sheet = (List1.List(i))
End If
Next
-
May 28th, 2008, 07:24 AM
#2
Re: Remove $ from text
Code:
For i = 0 To List1.ListCount - 1 'select sheet
If List1.Selected(i) = True Then
Dim sheet As String
sheet = (List1.List(i))
sheet = Replace(List1.List(i)),"$",""
End If
Next
-
May 28th, 2008, 07:30 AM
#3
Thread Starter
Frenzied Member
Re: Remove $ from text
It appear with red color when I paste it. Why?Mybe something wrong with this line
Code:
sheet = Replace(List1.List(i)),"$",""
-
May 28th, 2008, 07:52 AM
#4
Re: Remove $ from text
I typed it off the top of my head, and got the parentheses messed up.
It should be:
Code:
sheet = Replace(List1.List(i), "$", "")
Sorry 'bout that.
-
May 28th, 2008, 07:56 AM
#5
Thread Starter
Frenzied Member
-
May 28th, 2008, 08:49 AM
#6
Re: [RESOLVED] Remove $ from text
And there really isn't any reason to continually recreate your variable, so I would move the Dim statement outside of the loop.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|