Solved

Sequential pring with out page feed

Posted on 2004-09-08
8
196 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

896 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

14 Experts available now in Live!

Get 1:1 Help Now