Solved

Format printer

Posted on 2004-09-15
7
173 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
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

 
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
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…
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…

791 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