Solved

Format printer

Posted on 2004-09-15
7
169 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
  • 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
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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.
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

18 Experts available now in Live!

Get 1:1 Help Now