Solved

Sequential pring with out page feed

Posted on 2004-09-08
8
198 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
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
using Access 8 75
Excel - Save a copy of work book 13 88
MS Date Picker 64 bit 32 bit issue 12 59
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 54
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
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…

765 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