+ Reply to Thread
Results 1 to 3 of 3

Print content of cells to a text file

  1. #1
    Registered User
    Join Date
    11-14-2005
    Posts
    37

    Print content of cells to a text file

    Hi !

    I developed a small macro that prints the content of some cells to a text file.
    I use "print" command, but I want to have, let's say , the result of 2 "print" calls on the same line...Now, on each call, it goes to a new line..

    Is it possible to do that??? Or maybe using another function??

    Also, if I want to echo this character: " , what should I use for that??


    Thanks in advance,
    Chris

  2. #2
    Andrew Taylor
    Guest

    Re: Print content of cells to a text file

    If you put a semicolon after the string to be printed
    then no newline is added:

    Print #1, "Don't add new line after this";
    Print #1, " ... or after this";
    Print #1, " but after this"

    Would print as a single line:
    Don't add new line after this ... or after this but after this


    To use the double-quote character in a string, you need to double it:

    Print #1, "Here's a double quote: "" <<< see? "

    Would print:
    Here's a double quote: " <<< see?

    Or you can refer to it as Chr(34)

    hth
    Andrew Taylor



    loopoo wrote:
    > Hi !
    >
    > I developed a small macro that prints the content of some cells to a
    > text file.
    > I use "print" command, but I want to have, let's say , the result of 2
    > "print" calls on the same line...Now, on each call, it goes to a new
    > line..
    >
    > Is it possible to do that??? Or maybe using another function??
    >
    > Also, if I want to echo this character: *"* , what should I use for
    > that??
    >
    >
    > Thanks in advance,
    > Chris
    >
    >
    > --
    > loopoo
    > ------------------------------------------------------------------------
    > loopoo's Profile: http://www.excelforum.com/member.php...o&userid=28792
    > View this thread: http://www.excelforum.com/showthread...hreadid=485906



  3. #3
    Registered User
    Join Date
    11-14-2005
    Posts
    37
    Thanks a lot Andrew

    I remembered now about printing on the same line..I used it once but it seems I forgot it

    Once again,
    Thanks

    Chris

+ 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