+ Reply to Thread
Results 1 to 2 of 2

A macro that initiates other macros

  1. #1
    Registered User
    Join Date
    02-14-2010
    Location
    Australia, Australia
    MS-Off Ver
    Excel 2007
    Posts
    12

    A macro that initiates other macros

    Hi all,
    Can anyone tell me why this macro won't work:

    Sub Instructor()

    Application.Run "'Macros.xlsm'!Pt4"
    Application.Run "'Macros.xlsm'!Pt5"
    Application.Run "'Macros.xlsm'!Pt6"
    Application.Run "'Macros.xlsm'!Pt7"
    Application.Run "'Macros.xlsm'!Pt8"


    End Sub
    The macro actually keeps going up until Pt19.

    I get the error:

    Run-time error '1004':
    Cannot run the macro "Macros.xlsm'!pt4'. The macro may not be available in this workbook or all macros may be disabled.

    However, I'm sure macros are enabled and each of the the individual macros (Pt1, Pt2...) run in the workbook individually

    Any help greatly appreciated

  2. #2
    Forum Expert dominicb's Avatar
    Join Date
    01-25-2005
    Location
    Lancashire, England
    MS-Off Ver
    MS Office 2000, 2003, 2007 & 2016 365
    Posts
    4,867

    Smile Re: A macro that initiates other macros

    Good afternoon samnic

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code. Posting code without them makes your code hard to read and difficult to be copied for testing. Highlight your code and click the # at the top of your post window. For more information about these and other tags, found here

    DominicB
    Please familiarise yourself with the rules before posting. You can find them here.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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