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

    Repeating a print job (Excel XP)

    I have an identification label that is automatically printed when I run a macro. Currently each time the macro is run it prints one label.

    I would like to alter the macro to look at a specific cell on the worksheet and print the number of labels specified in that cell.

    For example, if A1 has a "1" in it I want 1 label printed. If A1 has a "2" in it, I want 2 labels and so on.

    I looked up REPEAT in Visual Basic help but am in a bit over my head with the various items listed. I don't know if I even can create an action within a macro that is dependant upon a value in a cell.

    Thanks,
    BH Davis

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

    Re: Repeating a print job (Excel XP)

    The macro probably uses the PrintOut method. This method has an argument Copies that can be used to specify the number of copies printed. You can refer to a cell like this

    whatever.PrintOut Copies:=Range("A1")

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

    Re: Repeating a print job (Excel XP)

    Hans,

    Thanks........I'll work on this a little later this morning.

    Do you sleep in front of your computer !!?!?!?!?!?! I don't know that I've ever posted on this forum when I didn't get a virtually immediate response from you!

    I participate in a number of professional woodworking forums but only check those a few times a day!

    As always........THANKS!

    BH Davis

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

    Re: Repeating a print job (Excel XP)

    I wouldn't be able to answer any question about woodworking! <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

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

    Re: Repeating a print job (Excel XP)

    Hans,

    That was sooooo cool!!!!

    All I had to do was replace "copies:=1" with "copies:=Range("c12") and that did the trick. I need to spend more time looking at this stuff before I go bothering you guys!

    Tanks !!!!!!!!! agian !!!!!!!!!

    BH Davis

Posting Permissions

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