CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: VB help

  1. #1
    Join Date
    Apr 2001
    Location
    Chicago, IL
    Posts
    27

    VB help

    Can i ask please ask you guys one more? Can you figure out why this won't print? Thank you very much.

    Private Sub mnuPrint_Click()

    cdlPrint.ShowPrinter
    For i = 0 To lstShopping.ListCount - 1
    Printer.Print lstShopping.List(i)
    Next

    End Sub

    Archie Kantzavelos

  2. #2
    Join Date
    Apr 2000
    Posts
    737

    Re: VB help

    I think u should call
    printer.NewPage at the begining and

    printer.enddoc at the end like this

    cdlPrint.ShowPrinter
    printer.NewPage
    For i = 0 To lstShopping.ListCount - 1
    Printer.Print lstShopping.List(i)
    Next
    printer.enddoc


  3. #3
    Join Date
    Mar 2000
    Location
    Arizona, USA
    Posts
    493

    Re: VB help

    What kind of error are you getting if any?
    What happens when the code executes?
    When I try the same code it works fine. You should add the Printer.EndDoc


    statement after your for loop.

    Kris
    Software Engineer
    Phoenix,AZ
    Kris
    Software Engineer
    Phoenix, AZ USA

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