+ Reply to Thread
Results 1 to 7 of 7

Quick Print Macro that will work for both 2007 and 2010

  1. #1
    Registered User
    Join Date
    01-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Quick Print Macro that will work for both 2007 and 2010

    I need a macro that will let me use the quick print function x number of times and x being the value found is cell A39


    For example this is what is working in Excel 2007
    ActiveWindow.SelectedSheets.PrintOut Copies:=Sheets("Auto Tag").Range("A39").Value


    And I assume this is the what would work in Excel 2010
    ActiveWindow.SelectedSheets.PrintOut Copies: :=Sheets("Auto Tag").Range("A39").Value, Collate:=True, _
    IgnorePrintAreas:=False


    I am looking for something that will work for either version and have thought of using an IF THEN ELSE statement like this

    IF excel is version 07 THEN PrintMacroA ELSE PrintMacroB


    I know hot to use IF THEN ELSE but done have any idea how test for the version of excel
    also I am open to anyway of doing this that might be better


    Thanks in advance for any help and for all the help I always get here.

  2. #2
    Valued Forum Contributor WasWodge's Avatar
    Join Date
    08-02-2010
    Location
    Hampshire,England
    MS-Off Ver
    Office 365 and Office 2010
    Posts
    881

    Re: Quick Print Macro that will work for both 2007 and 2010

    Cross-posted Here

    If you must X-Post...Why you should post a link
    The Forum Rules
    If my solution worked (or not) please let me know. If your question is answered then please remember to mark it solved

    Computers are like air conditioners. They work fine until you start opening windows. ~Author Unknown

  3. #3
    Registered User
    Join Date
    01-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Quick Print Macro that will work for both 2007 and 2010

    sorry didnt realize the two forums were related I should have read the Terms closer

    again Sorry

    However i think i worked it out on my own with
    Please Login or Register  to view this content.
    Last edited by alansidman; 10-15-2013 at 07:54 PM. Reason: code tags

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    20,720

    Re: Quick Print Macro that will work for both 2007 and 2010

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (I have added them for you this time. Please read all our rules and abide by them in the future.

    With regard to cross posting. The sites are not related. Read WasWodge's link that is highlighted to understand what happens when you cross post to another forum.

  5. #5
    Valued Forum Contributor
    Join Date
    11-15-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    531

    Re: Quick Print Macro that will work for both 2007 and 2010

    Quote Originally Posted by alansidman View Post
    With regard to cross posting. The sites are not related. Read WasWodge's link that is highlighted to understand what happens when you cross post to another forum.
    I'm glad I read this. Although I don't think I've been guilty, I did feel (as the O.P. likely did) that cross posting meant to another forum within the same site, not different web sites. I suppose that in that regard, Usenet counted as "one site" so if you posted twice within Usenet, that was clear cross posting.

    But now I see that a different domain counts as cross posting. Okay.

    Impressive that people are scouring both sites. I wonder how many is the max
    Chip, if you can read this, you're STILL making the world a better place with your immeasurably valuable gifts. Every week, you continue to help me (and untold numbers of others) tremendously. Practically no alternative outlets can match your effectiveness, even over the vast number of topics you demystify and empower usage of. You were, and still are, amazing.

  6. #6
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs
    MS-Off Ver
    MS Office 365
    Posts
    20,720

    Re: Quick Print Macro that will work for both 2007 and 2010

    It is not unusual for members of this forum and other forums to participate in more than one. Scouring is not the term that I would use. Usually, it is just luck in identifying them and letting other users know so that they don't waste their time if the OP has not indicated so.

  7. #7
    Valued Forum Contributor
    Join Date
    11-15-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    531

    Re: Quick Print Macro that will work for both 2007 and 2010

    Hey, scouring is good - connoting thorough to me

    The Ken Puls link really helps make the issue make sense.

+ 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. Drop down list and macro work excel 2010 but not 2007?
    By swanseaexcel in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-15-2014, 05:31 PM
  2. Macro from excel 2007 doesn't work in excel 2010
    By maddozs in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-26-2013, 04:57 AM
  3. Why does this following macro not work in 2010 but works in 2007?
    By Hyflex in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-06-2012, 01:23 PM
  4. Solver macro (2010) does not work in 2007
    By goldenaggregate in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-05-2012, 09:59 AM
  5. Will a Macro created in excel 2007 work in the 2010 environment?
    By mprmanzano in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-15-2012, 06:33 AM

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