Solved

Sequential pring with out page feed

Posted on 2004-09-08
8
195 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
  • 4
  • 3
8 Comments
 
LVL 4

Assisted Solution

by:frankd
frankd earned 25 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 25 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
 
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now