Results 1 to 7 of 7

Thread: who knows about text...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    who am I....and why do you want to know where I am?
    Posts
    326

    who knows about text...

    Anyone know how I can automaticly put a pagebreak every so many lines in my textbox. Keep in mind, it must be a normal textbox...

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Sort of like this? :
    VB Code:
    1. Private Sub PrintText()
    2.  
    3. Dim ArrTemp() As String
    4.  
    5.   arrTemp = Split(Text1.Text, vbCrLf)
    6.  
    7.   For x = 0 To UBound(arrTemp)
    8.     Printer.Print arrTemp(x)
    9.     Printer.NewPage
    10.   Next x
    11.  
    12.   Printer.EndDoc
    13.  
    14. End Sub

    That prints one line on each page, just come up with a simple counter to put x amount of lines on each page

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    who am I....and why do you want to know where I am?
    Posts
    326
    what I am aiming for here is to print a text box, but at the top of each page, since the textbox will be more then one page, have a header. So, I need to make a loop or something to seperate the textbox into a few different sections about one less then how many fit onto the page.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    who am I....and why do you want to know where I am?
    Posts
    326
    crptcblade, i have been playing with your code. But even though I changed the value of x, only 2 lines print. What am I missing?

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    who am I....and why do you want to know where I am?
    Posts
    326
    correction, its still 1

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    who am I....and why do you want to know where I am?
    Posts
    326
    guess i have got a problem!

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Jun 2001
    Location
    who am I....and why do you want to know where I am?
    Posts
    326
    thnx!

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