Click to See Complete Forum and Search --> : Indentation in notepad VERY URGENT


guptakvn
August 30th, 2001, 05:29 AM
I am developing an application in VB. For Reporting purposes, all the data is being written to the text file.
When i am trying to print the data to the text file (for reports) i am not able to align the data of columns in the
report. I have tried using space function to append space to the data it didnt work.
I have also tried using tab function to print data from a particular column that too didnt work.
please help me out quickly. I hope you understood the problem. If not please get to me imm. Is it not possible to indent
data in notepad(the text file to where data is written) ?

Cimperiali
August 30th, 2001, 06:51 AM
private Sub Command1_Click()
Open "testfile.txt" for Output as #1
print #1, "If AA then"
print #1, Chr(9) & "indented"
print #1, "End if"
Close #1
End Sub





Special thanks to Lothar "the Great" Haensler, Tom Archer, Chris Eastwood, TCartwright, Bruno Paris, Dr_Micahel
and all the other wonderful people who made and make Codeguru a great place.
Come back soon, you Gurus.

The Rater

Iouri
August 30th, 2001, 06:57 AM
Use format

Format$(123,"@@@@@@") -> "___123"
Format$(123,"!@@@@@@") -> "123___"
Print Format$(Format$(123.45,"0.00"),"@@@@@@")

MyStr = Format (5459.4, "##,##0.00")
MyStr = Format("hello", "<") returns "HELLO"




Iouri Boutchkine
iouri@hotsheet.com

A Hitchins
August 31st, 2001, 02:49 AM
May sound daft but are you sure you are using fixed width fonts, like Courier New in notepad?.