Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Sequential pring with out page feed

Posted on 2004-09-08
8
Medium Priority
?
205 Views
Last Modified: 2010-05-02
When writing a large program, I am in the need to follow the sequence of events. Now I know I can do it  through the debug command. What I would like is to the print text to the Cannon Parralel inkjet printer, without a page feed after each print command.
y = 1
D = 2
X = y + 1
z = d + 2
Printer.print "z = "; "z"
D = X + Z
PRINTER.PRINT "D = "; D


THE TEXT WOULD APPEAR ON THE SAME PAGE AS:

Z = 4
D = 7
0
Comment
Question by:gonzal13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 4

Assisted Solution

by:frankd
frankd earned 100 total points
ID: 12011295
Hi,

When ever you want a form feed add the command Printer.EndDoc.  That will print everything to the printer that you queued up using Printer.Print

y = 1
D = 2
X = y + 1
z = d + 2
Printer.print "z = "; "z"
Printer.EndDoc
D = X + Z
PRINTER.PRINT "D = "; D
Printer.EndDoc

With the above code you would get two pages printed.

Hope this answers your question.

Frank
0
 
LVL 13

Author Comment

by:gonzal13
ID: 12012497
I do not want a form feed. All I want is a line feed after each print command. What I get now is a page per line.

gonzal13(joe)
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 100 total points
ID: 12017466
Actually there's a NewPage method that the printer should wait for before throwing the page. EndDoc tells it to start printing.

I've just tried in on my Epson and it works the way that you need yours to. Does the printer work OK otherwise?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12019171
Hey, Joe.

Glad to help, but what was the problem?
If it was that you just hadn't tried it, then I hope you now have more confidence to experiment.

We're all here to learn.

Cheers, Graham
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12019246
Incidentally, the usual way to store debug info is to write it to a log file. There are some App.Log.. methods, but they only work with compiled applications. Otherwise you can write them to a text file using 'Open... For Append .. '
0
 
LVL 13

Author Comment

by:gonzal13
ID: 12019592
The first time I tried it, for some reason it printed one line per page. I got flustered and thus asked a question.

What I am doing is trying to rewrite a program I wrote in Darthmouth basic, would you believe in 1980 which consisted 25 feet of code into visual basic. Thus by printing out the important text, it is easier to look at than just using a debug routine. For one thing, I had not put enough remarks on the original, thus with a print out I can spot logic errors due to typos. The program worked back then. Unfortunately I do not have the final copywrited print out.


It was programmed on an APPLE II. I obviously ran into memmory restrictions. I got around it by saving the variables and just changed out floppies to continue the program.

Besides I want to learn Visual basic and this is a fairly good way to do it.
0
 
LVL 13

Author Comment

by:gonzal13
ID: 12019625
Frankd:

I will  need your command for a page feed.

Thanks
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12019795
Well, young Joe,

If Frankd doesn't come back, it's the method that I mentioned, Printer.NewPage.
 
The things we had to do...

I was retired earlier this year at the U.K. male statutory retirement age, though I hadn't seen any Basic until the mid 80s.

Actually, I believe that this sort of stuff belongs to the Lounge area, but I don't usually look there.

Cheers, Graham

0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question