+ Reply to Thread
Results 1 to 7 of 7

I get empty new lines in my textfile output

  1. #1
    Registered User
    Join Date
    11-05-2009
    Location
    NL
    MS-Off Ver
    Excel 2007
    Posts
    54

    I get empty new lines in my textfile output

    Hello,
    I use my script to export a range of values to a textfile. No big deal. Along the way I get empty new lines in the output file. I don't want to see empty new lines. Can anyone help me to export te results without empty new lines between values? For me this code works faster than any of CPearson because it won't interrupt Excel. http://www.cpearson.com/excel/ImpText.aspx

    Please Login or Register  to view this content.

    I hope I am clear enough so far.
    Thanks in advance,
    grid
    Attached Files Attached Files
    Last edited by grid; 12-29-2010 at 08:30 AM.

  2. #2
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: I get empty new lines in my textfile output

    Hi grid

    Try this
    Please Login or Register  to view this content.
    Let me know of issues.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: I get empty new lines in my textfile output

    Seems to me at least, you are not defining, nor assigning, a value to "Path" in Sub WriteIt.

    So where do we go from here?

  4. #4
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: I get empty new lines in my textfile output

    Hi grid

    Or simply change your existing code to
    Please Login or Register  to view this content.
    John

  5. #5
    Registered User
    Join Date
    11-05-2009
    Location
    NL
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: I get empty new lines in my textfile output

    John, yeah thats nice. Thank you!
    Marcol, how would you customize path? Can you give an example code?
    Thanks in advance,
    grid

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: I get empty new lines in my textfile output

    Looking at your original code I don't think you need to define Path as a variable

    Try this
    Please Login or Register  to view this content.

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  7. #7
    Registered User
    Join Date
    11-05-2009
    Location
    NL
    MS-Off Ver
    Excel 2007
    Posts
    54

    Re: I get empty new lines in my textfile output

    Marcol, thank you! I only made a few adjustments in this code of the original.
    Greet,
    grid

+ 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