Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 553
Default Field width when printing to immediate window

I am dumping the values in an array using the Debug.Print statment as follows:

Debug.Print HourData(Counter - 1, 0) & " " & HourData(Counter - 1, 1) & " "
& HourData(Counter - 1, 2) & " " & HourData(Counter - 1, 3) & " " &
HourData(Counter - 1, 4)

This is working fine but its difficult to read the data as the space width
for each field varies. Does anyone know how create set space width when
printing to the Immediate window so the columns are easier to read? I know I
can manuall enter more spaces in between the " ". Is there anything more
elegant than this?

Thanks

EM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Field width when printing to immediate window

Maybe something like

Debug.Print HourData(Counter - 1, 0) & Space(12 - Len(HourData(Counter - 1,
0))) & _
HourData(Counter - 1, 1) & Space(12 - Len(HourData(Counter - 1,
1))) & _
HourData(Counter - 1, 2) & Space(12 - Len(HourData(Counter - 1,
2))) & _
HourData(Counter - 1, 3) & Space(12 - Len(HourData(Counter - 1,
3))) & _
HourData(Counter - 1, 4)

or

Debug.Print HourData(Counter - 1, 0) & vbTab & _
HourData(Counter - 1, 1) & vbTab & _
HourData(Counter - 1, 2) & vbTab & _
HourData(Counter - 1, 3) & vbTab & _
HourData(Counter - 1, 4)


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"ExcelMonkey" wrote in message
...
I am dumping the values in an array using the Debug.Print statment as

follows:

Debug.Print HourData(Counter - 1, 0) & " " & HourData(Counter - 1, 1) & "

"
& HourData(Counter - 1, 2) & " " & HourData(Counter - 1, 3) & " " &
HourData(Counter - 1, 4)

This is working fine but its difficult to read the data as the space

width
for each field varies. Does anyone know how create set space width when
printing to the Immediate window so the columns are easier to read? I

know I
can manuall enter more spaces in between the " ". Is there anything more
elegant than this?

Thanks

EM



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How Do I Nail Down Chart Width for Printing Mike[_2_] Charts and Charting in Excel 2 March 24th 10 01:28 PM
Working Around 240 Character PRN Field Width Limit Confused_in_Houston[_2_] Excel Discussion (Misc queries) 1 January 20th 10 09:25 PM
I don't see the Pivot table field list window Zafar New Users to Excel 1 October 14th 08 11:05 PM
'Match' field in Find and Replace window denhamlee Excel Discussion (Misc queries) 0 September 19th 07 02:11 PM
printing window pops up when Visible field is false Bob[_39_] Excel Programming 1 November 8th 03 03:08 PM


All times are GMT +1. The time now is 06:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"