+ Reply to Thread
Results 1 to 3 of 3

Replace Quotes in Notepad with VBA

  1. #1
    Registered User
    Join Date
    04-07-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Replace Quotes in Notepad with VBA

    Hi All:

    Just signed up with the forum and it's seems like an extremely useful resource for me. I'm just starting out with VBA and am in the middle of my first novel (Power Programming with VBA). I'm basically been training myself by using the macro recorder, google, and now...this forum. What I'm trying to do at the moment is take an excel file and save it as a tab-delimited text file. Seemed simple. What I'm finding is that since some of my data has commas, the txt file inserts quotes into it. I found some resources for VBA code stop them from being transferred, but it's a bit over my head and I'm not really into copying and pasting as I'll learn nothing from it. Below is the code I'm currently using the get from Excel to the txt file:

    Please Login or Register  to view this content.
    The additional code that I found via Google and am just now trying to use is my current problem. I have no problem getting the file to open, but using the find/replace to work is where I get stuck. I'm embarrased to show my "replace" method as I know it won't work, but at least you can see what I'm trying to do. Replace quotes with blanks.

    Please Login or Register  to view this content.
    Any suggestions with either code would be greatly appreciated. The first one seems to work perfectly, but I'm sure there are shortcuts that I'm overlooking. The second one is a mess!

    Thanks
    Last edited by BonesJones; 04-08-2011 at 02:06 PM.

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Replace Quotes in Notepad with VBA

    Hi BonesJones and welcome to the forum,

    It is a lot easier to read your post and try to give an answer if you put your code above in Code Tags. It is really easy and you need to edit your above post or we get demerrits for answering your question.

    Here is how to put code tags around your code above.
    1. Click on the Green Edit button just below your post
    2. Click on "Go Advanced" below the message area
    3. Select with your mouse the text that is code in the message area
    4. Click on the "#" Icon just above the message area. This puts the Code Tags on it.
    5. Then save.
    Last edited by MarvinP; 04-11-2011 at 08:46 PM.
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-07-2011
    Location
    Los Angeles, CA
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Replace Quotes in Notepad with VBA

    Can anyone assist with this?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1