+ Reply to Thread
Results 1 to 15 of 15

Two macros are running separately but they are not running at once

  1. #1
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Two macros are running separately but they are not running at once

    Dear excel experts,
    Two macros are running separately but they are not running at once
    We have 2 different macros (TransferDataCC & TransferDataHMR) for 2 different activities, however, now we want to run both the macro at once instead of running separately.
    Please Login or Register  to view this content.
    Please help us to resolve.
    Kravindra
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Two macros are running separately but they are not running at once

    What do you mean by "at the same time"? Do you mean literally in parallel? VBA is single-threaded. You cannot run two macros at the same time. Why do you want to do that? We might have a solution that will meet your needs if you describe your problem rather than the perceived solution.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    I mean
    Running multiple macro one after other but by single click.(running multiple macros with the help of a single macro)

    Thanks in advance.

    Kravindra

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Two macros are running separately but they are not running at once

    That's exactly what you've done in the sub Report that you showed above. What do you need to do in addition to that?

  5. #5
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    Not require any addition, however, it's not working.
    I tried to run both the macros (TransferDataCC & TransferDataHMR) separately, it's running without any errors.
    But with this macro (Report; which is created for running 2 macros one after another by single click), it's not working.

    Thanks in advance.
    Kravindra

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Two macros are running separately but they are not running at once

    It works fine for me when I click on "5. Run Report".

  7. #7
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    By running
    "5. Run Report"

    only "TransferDataCC" is working, other "TransferDataHMR" is not working

    Thanks in advance.
    Kravindra

  8. #8
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,532

    Re: Two macros are running separately but they are not running at once

    They both run. Maybe the second one is not doing what you expect. What is HMR supposed to do?

  9. #9
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    Functions of both the macros are same i.e. to identify the correct and unique 40 records considering given criteria.
    Only thing is we are putting HMR input in HMR and CC in CC.
    They will have to run (identify the correct and unique 40 records considering given criteria) one after one.
    Here, by running "5. Run Report"
    only "TransferDataCC" is working (correct and unique 40 records are appearing), other "TransferDataHMR" is not working (correct and unique 40 records are appearing in HMR and Report sheets)

    Thanks in advance.
    Kravindra

  10. #10
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    "TransferDataHMR" is not working (correct and unique 40 records are NOT appearing in HMR and Report sheets)

  11. #11
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    Please help us to resolve the query.
    Thanks in advance.
    Kravindra

  12. #12
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Two macros are running separately but they are not running at once

    Slight changes are made in macros.

    TransferDataCC

    TransferDataHMR

    It is working.
    Attached Files Attached Files
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  13. #13
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    Perfect Sir, it working..
    hats off you sir,
    Just do one small thing for me, after running macro, all columns from M column of "HMR" and "CC" worksheets are to be hidden. so that, only A to L columns will be appeared.
    Sir, Please do this for me.

    Thanks in advance.
    Kravindra

  14. #14
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,513

    Re: Two macros are running separately but they are not running at once

    Changes are done in macros.
    Attached Files Attached Files

  15. #15
    Forum Contributor
    Join Date
    07-19-2017
    Location
    Mumbai
    MS-Off Ver
    2013
    Posts
    305

    Re: Two macros are running separately but they are not running at once

    Done Sir,
    Thanks a lot for your great help , You are really charm !!

    Kravindra

+ 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. [SOLVED] Event Driven Macros stop running after running a routine macro
    By ChemistB in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2017, 12:34 PM
  2. [SOLVED] Hiding the file when running macros and after running macros
    By thilag in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2016, 07:15 AM
  3. Running two macros as one
    By Seraph84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-11-2011, 01:48 AM
  4. Running Macros
    By ornamentalist in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-12-2009, 07:49 AM
  5. running macros from IF
    By CJ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-30-2006, 12:10 PM
  6. Running Macros when on the LAN
    By Bettergains in forum Excel General
    Replies: 0
    Last Post: 10-06-2005, 05:05 PM
  7. running macros
    By Jay in forum Excel General
    Replies: 2
    Last Post: 04-28-2005, 08:06 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