+ Reply to Thread
Results 1 to 4 of 4

Skip lines if macro is called from another macro

  1. #1
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Skip lines if macro is called from another macro

    Is this at all possible?

    I am calling sub B from sub A and want to skip some lines in sub B (only when it is called from sub A).

    Thank you very much.

    Kind regards,
    Henk Stander

  2. #2
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Skip lines if macro is called from another macro

    You may add an optional argument to subB:
    Please Login or Register  to view this content.
    This will allow sub A to use:
    Please Login or Register  to view this content.
    • Please remember to mark threads Solved with Thread Tools link at top of page.
    • Please use code tags when posting code: [code]Place your code here[/code]
    • Please read Forum Rules

  3. #3
    Forum Contributor
    Join Date
    05-02-2012
    Location
    Mosselbaai, Suid Afrika
    MS-Off Ver
    Excel 2016
    Posts
    107

    Re: Skip lines if macro is called from another macro

    Thank you so much Izandol, much appreciated!

    Regard,
    Henk

  4. #4
    Forum Guru Izandol's Avatar
    Join Date
    03-29-2012
    Location
    *
    MS-Off Ver
    Excel 20(03|10|13)
    Posts
    2,581

    Re: Skip lines if macro is called from another macro

    You are welcome.

+ 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. Replies: 0
    Last Post: 03-28-2013, 10:25 AM
  2. [SOLVED] Macro to Delete useless lines, rearrange by dates and skip lines between different days.
    By Tmc2159 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-12-2012, 02:15 PM
  3. Worsened macro performance if called from another macro?
    By altren in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-18-2011, 11:40 AM
  4. Exiting called macro on error, then ending macro caller.
    By Yappa in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-13-2008, 10:28 PM
  5. Replies: 3
    Last Post: 07-06-2006, 02:45 PM

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