CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2001
    Posts
    14

    Indentation in notepad VERY URGENT

    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) ?



  2. #2
    Join Date
    Jul 2000
    Location
    Milano, Italy
    Posts
    7,726

    Re: Indentation in notepad VERY URGENT


    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
    ...at present time, using mainly Net 4.0, Vs 2010



    Special thanks to Lothar "the Great" Haensler, Chris Eastwood , dr_Michael, ClearCode, Iouri and
    all the other wonderful people who made and make Codeguru a great place.
    Come back soon, you Gurus.

  3. #3
    Join Date
    May 2000
    Location
    New York, NY, USA
    Posts
    2,878

    Re: Indentation in notepad VERY URGENT

    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
    [email protected]
    Iouri Boutchkine
    [email protected]

  4. #4
    Join Date
    Aug 2001
    Location
    London, England
    Posts
    3

    Re: Indentation in notepad VERY URGENT

    May sound daft but are you sure you are using fixed width fonts, like Courier New in notepad?.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured