Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2002
    Location
    CT
    Posts
    361
    Thanks
    0
    Thanked 1 Time in 1 Post

    Automatic printing question (Excel XP)

    I do my invoicing in Excel with a nicely automated invoice form that I've created over the years. I run a macro that gives me data entry pop up windows in which I enter things like account terms, sales tax if applicable, deposits received etc.

    The macro then sends the file to my laser printer for printing the invoice. After that it erases all pricing iformation and then sends a packing slip version to my 9 pin printer that uses a 2 part carbonless paper.

    Occasionally though I don't need a packing slip. Right now I just let it print and then throw it away.

    Does anyone know if there is a way I can add some options to my macro that would allow me to choose whether or not the packing slip should print (or even be created). Creating the packing slip and printing it are the last steps in the macro.

    Thanks,
    BH Davis

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Automatic printing question (Excel XP)

    You can display a prompt whether you need a packing slip, and only create it if you click Yes:.

    If MsgBox("Do you want a packing slip?", vbQuestion + vbYesNo) = vbYes Then
    ' The code to generate and print the packing slip goes here
    ...
    ...
    End If

  3. #3
    3 Star Lounger
    Join Date
    Jan 2002
    Location
    CT
    Posts
    361
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Automatic printing question (Excel XP)

    Hans,

    You're a genious!!!!!!!!!! Well........ at least you know a lot more about Excel then I do!

    Anyway, thanks for taking the time to help me out. As you know I could look in the book but would probably have spent an hour or so trying to dig it out. I'll add this to my macro in the next day or so.

    Thanks again,
    BH Davis

  4. #4
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automatic printing question (Excel XP)

    Just a quick comment. Using the MsbBox to ask if the packing slip should be printed means you are going to have to click or press a key every time you print to answer that question. If this were my application, I would put something on the form that would indicate if the packing slip should be printed and have it default to yes if the packing slip is normally printed. That way, you would only have to click or enter something when you don't need the packing slip.
    Legare Coleman

Posting Permissions

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