Re: Print with no line feed
- From: "Rick Rothstein \(MVP - VB\)" <rick.newsNO.SPAM@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 18 Feb 2008 22:05:10 -0500
Did you try either of what Dave posted? If you look carefully at the second one, you will see a semi-colon after the Print statement argument... that tells the Print statement to suppress the line feed (actually, it is a carriage return followed by a line feed the Print added to your output and it is this combination that the semi-colon suppresses). By the way, this is covered in the help files for the Print# Statement (which I am guessing you didn't read).
Rick
<gimme_this_gimme_that@xxxxxxxxx> wrote in message news:9c7d6ef5-a745-492e-8606-d93f10d58807@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
No silly.
Is there a way to tell Print not to add the line feed?
On Feb 18, 3:31 pm, Dave Peterson <peter...@xxxxxxxxxxxxxxxx> wrote:
Sub Write2()
Open "C:\output.txt" For Output As #1
Print #1, "hello world"
Close #1
End Sub
or maybe...
Sub Write2()
Open "C:\output.txt" For Output As #1
Print #1, "hello";
Print #1, " world";
Close #1
End Sub
"gimme_this_gimme_t...@xxxxxxxxx" wrote:
> I have:
> Sub Write2()
> Open "C:\output.txt" For Output As #1
> Print #1, "hello"
> Print #1, " world"
> Close #1
> End Sub
> Which creates a file that looks like
> hello
> world
> Is there a way to tell Print not to add the line feed - so I can get
> hello world
> Thanks.
--
Dave Peterson- Hide quoted text -
- Show quoted text -
.
- Follow-Ups:
- Re: Print with no line feed
- From: Luke Alcatel
- Re: Print with no line feed
- From: Dave Peterson
- Re: Print with no line feed
- References:
- Print with no line feed
- From: gimme_this_gimme_that@xxxxxxxxx
- Re: Print with no line feed
- From: Dave Peterson
- Re: Print with no line feed
- From: gimme_this_gimme_that@xxxxxxxxx
- Print with no line feed
- Prev by Date: RE: How to compare the max width of a cell compared to the max width o
- Next by Date: RE: I have Some Sort of Macro/Work*** Corruption Problem :-(
- Previous by thread: Re: Print with no line feed
- Next by thread: Re: Print with no line feed
- Index(es):