Solved

Format printer

Posted on 2004-09-15
7
174 Views
Last Modified: 2010-05-02
Presently if I use the following command the output is a vertical set of numbers. Since I need to review the output of at least 400 numbers, I would like the printer to print for example 100 numbers across before a carriage return

The following prints only one number in each row
For J = 1 to 400
         Printer.print T(J)
Next J

2
8
51
256
36

Would like the following:
2,8,51,256,36..........
with a line feed between each row

I looked in the MSDN reference program and in 4 books, but I have not found the carriage return command to overcome the vertical printing nor how to configure the statement for printing in rows. The output is in real time and I am not reading from a file.

gonzal13(Joe)
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
  • 5
  • 2
7 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12069145
For J = 0 to 41
    for k = 1 to 10
         Printer.print T(J*10 + k); ' note the ";"
    next k
    Printer.print
Next J
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12069157
For J = 0 to 39, obviously.

0
 
LVL 13

Author Comment

by:gonzal13
ID: 12069360
In the lines that you presented, you had a comment:
'note the ";"

I do not see it in the code.

gonzal13(Joe)
0
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!

 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12069964
 |
  V
k); ' note the ";"
0
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 12069979
It looked better aligned in the edit box.
I'll try again

  |
  V
k); ' note the ";"
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 50 total points
ID: 12070048
Actually I've looked again at your requirement & I realise that I am not  putting the commas in.

For J = 0 to 41
    for k = 1 to 9
         Printer.print T(J*10 + k) & ", ";
    next k
    Printer.print T(J*10 + 10)
Next J
0
 
LVL 13

Author Comment

by:gonzal13
ID: 12070621
Ok, works like a champ. Thanks

Gonzal13(Joe)
0

Featured Post

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!

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
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…
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…

726 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