+ Reply to Thread
Results 1 to 13 of 13

unify 2 macro

  1. #1
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    unify 2 macro

    Hello to all,
    These 2 macros to print to PDF, you can merge them?

    Please Login or Register  to view this content.
    thanks in advance.
    max max

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

    Re: unify 2 macro

    Hello max_max,

    I would keep them as they are for easy editing if needed, and just use the First Macro as shown below:

    Please Login or Register  to view this content.

    Regards.
    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] .

  3. #3
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unify 2 macro

    Application.ActivePrinter = "PDFCreator su Ne00:" '<<< errore qui / error here

    Please Login or Register  to view this content.

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

    Re: unify 2 macro

    Hi max_max,

    Does Sub stampa_PDF_2() 'lavoro work if you only use that Code

  5. #5
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unify 2 macro

    Hello to all.
    I changed the first macro macro does not work.
    This macro does not start, perhaps because of erroneous "elseif end if"?

    Please Login or Register  to view this content.
    A greeting.
    max_max

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

    Re: unify 2 macro

    Hi max_max,

    Let us start over.

    In Post#1, can you run each sub on its own, and does each one work?

  7. #7
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unify 2 macro

    I hope to explain myself, I use google translator.
    In post #1 there are two macro.

    macro #1 Sub stampa_PDF_1 () 'home / my home
    it works at my house and not in my office

    macro #2 Sub stampa_PDF_2 () 'office / my office
    It works in my office and not at my house

    max_max

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

    Re: unify 2 macro

    Thank you, max_max.

    How do you activate these Macros, do you use a "Button", or do you select it from the list of Macros?

  9. #9
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unify 2 macro

    If the macro is at home the macro for the office is cleared with the apex

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

    Re: unify 2 macro

    In that case try experimenting with the Code like Below;

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unify 2 macro

    Not work:

    Please Login or Register  to view this content.
    error here:

    Application.ActivePrinter = "PDFCreator su Ne00:" '<<<<<<<<<
    macro Sub stampa_PDF_1()

    in my home.

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

    Re: unify 2 macro

    There seems to be some confusion here,

    According to Post#1 you show;

    Please Login or Register  to view this content.
    And in your last Post you show it as:

    Please Login or Register  to view this content.

  13. #13
    Forum Contributor max_max's Avatar
    Join Date
    06-28-2013
    Location
    italy - venice
    MS-Off Ver
    Excel 2007
    Posts
    1,693

    Re: unify 2 macro

    Please Login or Register  to view this content.

+ 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. Formula to Unify Text Entries in the Same Column
    By Taisir in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 12-22-2015, 03:01 AM
  2. [SOLVED] Define variable in macro than calling that macro inside another macro
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-21-2015, 10:58 AM
  3. Unify/merge/mix rows based on duplicate cells
    By alealberto in forum Excel General
    Replies: 7
    Last Post: 07-30-2015, 09:13 PM
  4. [SOLVED] How to unify random data in Excel
    By herukuncahyono in forum Excel General
    Replies: 7
    Last Post: 07-10-2013, 04:28 AM
  5. Trying to unify multiple different formats of phone numbers
    By Chanu in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-21-2013, 03:16 PM
  6. Stab in the dark - Centura (Unify) Report Builder
    By NBVC in forum The Water Cooler
    Replies: 5
    Last Post: 08-20-2010, 08:11 AM
  7. Cannot find macro error when running a macro from a macro in a diffrent workbook.
    By Acrobatic82 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2010, 09:22 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