Results 1 to 3 of 3

Calling Macro Inside Macro

Threaded View

  1. #1
    Registered User
    Join Date
    07-01-2020
    Location
    Yerevan
    MS-Off Ver
    2010
    Posts
    44

    Calling Macro Inside Macro

    Hi All,

    I have Macros calling in a Macro, for example:

    Sub Macro_All
    
    Call Macro1
    Call Macro2
    Call Macro3
    
    End Sub
    Macro1, Macro2 and Macro4 each import a different text file from a designated folder and perform some operations. However, sometimes the file may not be available (which is ok), but in this case the code stops and there is an error.

    I would like to make an adjustment such that if for example Macro2 does not work (because there is no file to import) it skips it and passes to Macro3 and so on.

    Is this something I can do?

    Many thanks,
    Last edited by AliGW; 07-14-2020 at 02:49 AM. Reason: Code tags corrected.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Manipulating ActiveWorkbook when calling macro from Personal Macro Workbook
    By 146considerations in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-05-2017, 12:16 AM
  2. Error when calling a 'sheet macro' inside a workbook wide macro
    By Rhino_dance in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-09-2016, 03:46 PM
  3. [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
  4. [SOLVED] Calling a macro inside another macro
    By MikeMeerkat in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-15-2015, 05:30 AM
  5. Calling macro 10 times, add header list to macro call only once
    By capson in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2013, 09:42 AM
  6. [SOLVED] Calling a macro from an event macro. Using nest loops with if statements
    By c0d3crunch3r in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-12-2012, 08:31 AM
  7. Button command doesnt work while calling a macro from a macro
    By bryan444 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 09:39 AM

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