Results 1 to 9 of 9

Thread: printing problem

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    hi, I'm getting an error poiting to X saying that it is no defined:

    Code:
        Dim strPrint As Integer
    
        For z = 0 To ListPrintOut.ListCount - 1
            strPrint = strPrint & ListPrintOut.List(z) & vbCrLf
        Next z
        Printer.Print strPrint
        Printer.EndDoc
    NXSupport - Your one-stop source for computer help

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    I don't see an X, dimava...???
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    sorry, I meant z
    NXSupport - Your one-stop source for computer help

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    well, the obvious question is : Do you have "Option Explicit" at the top of your code?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    ok, thanks
    NXSupport - Your one-stop source for computer help

  6. #6
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    no problem, sometimes I forget to declare the variables for my For...Next loops, too
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  7. #7

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    now it points to this line:

    Code:
    strPrint = strPrint & ListPrintOut.List(z) & vbCrLf
    having error 13 'over flow'

    but this is only when there are items in the list box
    NXSupport - Your one-stop source for computer help

  8. #8
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    strPrint is declared as an Integer, that's why, it should be a String...
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  9. #9

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    East Providence, RI
    Posts
    1,715
    yep, thanks
    NXSupport - Your one-stop source for computer help

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