|
-
Oct 22nd, 2002, 05:07 PM
#1
Thread Starter
Junior Member
How to Convert "TEXT" to TEXT? Remove the quotations?
I have a text file that I load into a list box(seems easier to search and use index to reference items in list).
It starts out like this:
begin general_information
  name "Example"
  designer "Steve McNally"
I need to get rid of the quotation marks from both sides of the word "Example" and "Steve McNally".
I can get rid of the mark on the left with Mid (String)
txtName = Mid(List2.List(1), 9) wich produces: Example"
txtDesigner = Mid(List2.List(2), 13)  produces: Steve McNally"
I've tried mixing the Mid function with the Left and the Right functions, but get odd results like: ample""Ex
Then, I'm going to print it back to a text file, but I'll be able to Print the " " back around them no problem.
I'd appreciate any help. I'm still kind of a novice so, if you could just paste some code please.
Ian
-
Oct 22nd, 2002, 05:09 PM
#2
Use the Replace function......
-
Oct 22nd, 2002, 05:12 PM
#3
Fanatic Member
quickest way would be
VB Code:
Dim s As String
s = """blah"""
s = Replace(s, """", vbNullString)
but that would get rid of all quoty things
-
Oct 22nd, 2002, 05:34 PM
#4
Thread Starter
Junior Member
lol, there's a Replace Function?
Thanks, it works too!!
Ian
-
Oct 22nd, 2002, 05:38 PM
#5
Originally posted by IanL
lol, there's a Replace Function?
Thanks, it works too!!
Ian
Yeah... sometimes it's just that easy.....
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
|