+ Reply to Thread
Results 1 to 19 of 19

I want to create a macro in excel 2007 that allows me to set print area and then print it

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    I want to create a macro in excel 2007 that allows me to set print area and then print it

    Hi,
    Can you please help me accomplish this macro. I want to set the print area from Column 12 to column 7, then print that area only. I want to be able to do it on any row in my table that has about 5,000 rows.

    I do know how to press shift + home, then press the set print area button, then the print button, and it prints the row material I want. But I want to just create a macro that will do all this. Can you pleas help.

    Thanks,
    Cliff

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Try this:

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    I actually just had to do this myself today, if you could attach a sample I'm sure I could help

  4. #4
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Thanks so much for your response. I tried it, but I must not have the columns numbered correctly. Here is a sample of the table I use set print area and prinr 7-17-14.docx.
    Cliff

  5. #5
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    set print area and prinr 7-17-14.docxThanks so much for your response. I am attaching the sample of my Table I want to use. Hope this gets to you and this is what you need.
    Cliff

  6. #6
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Define the named Range as PrintStart, the rows you want repeated on each sheet.



    Please Login or Register  to view this content.

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Which columns (letters) do you want in your range? Column 7 is G, column 12 is L.

  8. #8
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Thanks so much for the help. This macro seems to work, but I only want to print the one customer's row of info and not the heading. It now prints heading, too. I will have over 5,000 rows and it will grow and be dynamic. Also, I need to be able to set the print area each time on each different customer.

  9. #9
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Thanks again. I want one row to print G thru L only.

  10. #10
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Remove the rows to repeat in the page layout settings and change this line.
    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Thanks again. I am not sure I follow. What do you mean "Remove the rows to repeat in the Page Layout settings". Tried Set PrintRange with G1 but now the Sub PrintAll() needs debuging?

  12. #12
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    In excel go to the page layout tab, then go to page set up. Go to the sheet tab and you'll see Rows to repeat at the top. If you still can't get it worked out upload a copy of the file and I can fix it for you.

  13. #13
    Forum Contributor guitarsweety's Avatar
    Join Date
    10-30-2012
    Location
    North Carolina
    MS-Off Ver
    Excel 2010
    Posts
    188

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    I put this together, see if it suites your needs. Print.xlsx

  14. #14
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Sample STRING TABLE TEST 7-119-14.xlsm
    Thanks again for all your help. I have attached a sample of my file that I want to do a macro to set print area and print. I have narrowed my print area to G thru J. G is my start column. There are no columns to the left of G. I hope this explains it better. Can you see my attachment?
    Cliff

  15. #15
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,895

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    This should work. Change L to J if those are the columns you want in the highlighted row.

    Please Login or Register  to view this content.

  16. #16
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Thanks so much. I will test it out shortly
    Cliff Price

  17. #17
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Thank you so much for your help. I have been using some pre set Excel button for a while. Can we expand what you gave me. I will be on the cell and row I want to print. I just want to press a button to set print area of the 3 cells in one dynamic row and then print it. Can you please help me with that. Now, I click on my cell in "K", then press Shift+Home, then press the "Set Print Area" button, then Press the "Print" button. It works, but is too many key strokes. Every time I try to do a macro. It won't repeat.
    Thanks,
    CliffDPrice

  18. #18
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Thank you, Sorry I have been so slow in replying, but going a slower method of printing now. Trying again. This is what I want to print. I will be in Column K.
    PRICE, CLIFF (column I) "(91x) 494-xxxx (91x) 664-xxxx" (Column I) 4/11/2015 WILSON TOUR 102 -U WSG #55(Column K)

    I will have about 6,000 rows of individuals and their string jobs. When I am in current row of Column K after I have entered my stringing info will tab to Column L. I want to be able to press a button and it will set my print area of K, I, J in one row and print the selected row of text. Now I press Shift + Tab, Shift+Home, Press the Set Print Area button, then press the quick print button.
    Thanks so much for your time.
    CliffDPrice

  19. #19
    Registered User
    Join Date
    01-06-2014
    Location
    Tulsa, OK USA
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: I want to create a macro in excel 2007 that allows me to set print area and then print

    Sorry but this is the correct columns headers

    PRICE, CLIFF (column H) "(91x) 494-xxxx (91x) 664-xxxx" (Column I) 4/11/2015 WILSON TOUR 102 -U WSG #55(Column K)

    Cliff

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 PM
  2. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. Create a print macro that would automatically select print area?
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 04:05 AM
  4. Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM
  5. [SOLVED] Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 11:05 PM

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