+ Reply to Thread
Results 1 to 3 of 3

Printing Macro-to click a print button

  1. #1
    Registered User
    Join Date
    06-08-2011
    Location
    Texas
    MS-Off Ver
    Excel 2007
    Posts
    1

    Printing Macro-to click a print button

    I have 6 worksheets and an entry sheet in my excel 2007 workbook. I need to create a macro print button that will print a certain number of copies of each worksheet based on a number in cells on the entry sheet. For example my worksheets are all departments of my store and the entry sheet has numbers of employees per department. I want to be able to click a print button and it automatically print enough worksheets per employee per department.

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    re: Printing Macro-to click a print button

    here is a macro that could help you.
    You need to have a first sheet where you'll create a two columns table:
    in A you put the sheets name
    in B you put the number of copies you need of it.
    I give the sheet the name "Entry". If you don't use this name, change the macro accordingly.

    Give a name to this range (it could be the same as in macro "dept_empl"
    I have a VLOOKUP function to pull out the number of copies required.

    Please Login or Register  to view this content.
    End Sub

    Pierre

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    re: Printing Macro-to click a print button

    You don't need to VLOOKUP the number of sheets

    Assuming the store name is in A1 and the specific sheet is named as the text in A1 & the number of employees in B1

    Select A1 then run the code

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1