+ Reply to Thread
Results 1 to 19 of 19

New Macro I created to format a page and print, prints 5 copies

  1. #1
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Angry New Macro I created to format a page and print, prints 5 copies

    I created a new macro to format a page to US Letter and print 1 page wide and 1 page tall, then print. All works fine, but it prints 5 copies. I have made two different named macros and they both do the same thing. Help?!

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: New Macro I created to format a page and print, prints 5 copies

    Why dont you post your code here?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    I am not sure what you mean by "my code".... I used mouse clicks to record the macros... ?

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: New Macro I created to format a page and print, prints 5 copies

    Yes, the same code. You can post it here and we can help you with it.

  5. #5
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    OK, well.... I started by clicking on Tools, then the drop down to Macros, then Record new Macro. From there, I named my Macro, then in the box for the shortcut key, I put an "p" and clicked OK.

    I immediately went to File > Print > Page setup > Options > changed the paper size to Letter > OK > clicked "Fit to 1 page wide by 1 page tall > Print.

    Then I went back to Tools > Stop Recording Macro.

    When I press Option + Command + p, it does it's thing and prints 5 copies.

    Is that what you wanted to know?

  6. #6
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: New Macro I created to format a page and print, prints 5 copies

    In order to solve your problem. We need code.

    Press ALT+F11 --> click module -----you can see some codes ----copy that codes ----- post to this thread

  7. #7
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    Oh, see that is what I didn't know. OK, I think this is what you want:


    Please Login or Register  to view this content.
    Last edited by Cutter; 09-20-2012 at 07:42 PM. Reason: Added code tags

  8. #8
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: New Macro I created to format a page and print, prints 5 copies

    try this.

    Please Login or Register  to view this content.
    Last edited by thameem127; 09-20-2012 at 04:49 PM. Reason: remove codes

  9. #9
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: New Macro I created to format a page and print, prints 5 copies

    @ tamalloni

    Welcome to the forum.

    Please notice that code tags have been added to your post(s). The forum rules require them so please keep that in mind and add them yourself whenever showing code in any of your future posts. To see instructions for applying them, click on the Forum Rules button at the top of the page and read Rule #3.
    Thanks.

  10. #10
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    @Thameem127
    Thank you, I tried this and now it prints only two copies.

    @Cutter
    OK, Sorry, I am new to this forum and was not aware. I will do that in the future. Thank you.

  11. #11
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: New Macro I created to format a page and print, prints 5 copies

    Can you again please upload the Code you are now using that prints 2 copies?
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  12. #12
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: New Macro I created to format a page and print, prints 5 copies

    Quote Originally Posted by tamalloni View Post
    @Thameem127
    Thank you, I tried this and now it prints only two copies.
    Hai tamalloni,

    If your satisfied with my code. Please mark this thread as solved.

  13. #13
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    Hi Winon, here you go:

    Please Login or Register  to view this content.
    Last edited by Cutter; 09-21-2012 at 09:18 PM. Reason: Fixed CODE tags

  14. #14
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    @ Thameem127, I am new to this site, can you tell me how to mark is as solved?

  15. #15
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: New Macro I created to format a page and print, prints 5 copies

    Quote Originally Posted by tamalloni View Post
    @ Thameem127, I am new to this site, can you tell me how to mark is as solved?

    Go to Thread Tools available in the top left of this thread ----> click it----> select Mark this thread as solved.

  16. #16
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: New Macro I created to format a page and print, prints 5 copies

    @ tamalloni

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  17. #17
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    The reason I never marked it as solved was because "Winon" had asked me to post the code that was printing two copies, which I did, and I assumed he/she would have replied with another solution. Ultimately, I only want one page to print, not two. So technically it is not solved. But it's ok. Thank you all for your help.

  18. #18
    Registered User
    Join Date
    09-19-2012
    Location
    Woodlan Hills, CA
    MS-Off Ver
    Excel for Mac 2011
    Posts
    9

    Re: New Macro I created to format a page and print, prints 5 copies

    Winon, were you going to suggest a new code?

  19. #19
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,573

    Re: New Macro I created to format a page and print, prints 5 copies

    Please Login or Register  to view this content.
    I think it should print twice as you instructed it to do so.
    Delete the 2nd of the above lines and it should just print one page.

    Also, search for "cleaning code generated by macro recorder"
    You can shorten the code considerably and the bonus will be that you'll learn about coding.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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