?
Solved

Format printer

Posted on 2004-09-15
7
Medium Priority
?
178 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 200 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

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…
Suggested Courses
Course of the Month17 days, 4 hours left to enroll

864 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