+ Reply to Thread
Results 1 to 4 of 4

Disabling a specific macro

  1. #1
    Matt
    Guest

    Disabling a specific macro

    I have a procedure (procedure A) that calls a macro (Macro A). I need
    Procedure B to run Procedure A but to skip Macro A. Possible?????

  2. #2
    Jim Cone
    Guest

    Re: Disabling a specific macro

    Matt,

    Here is one way...
    '-------------------------
    Sub ProcA(Optional Arg As Boolean = True)
    MsgBox "ProcA started"
    If Arg Then Call DoSomething
    End Sub

    Function DoSomething()
    MsgBox "Function DoSomething started"
    End Function

    Sub ProcB()
    MsgBox "ProcB started"
    Call ProcA(False)
    End Sub

    Sub StartItUp()
    Call ProcA
    Call ProcB
    End Sub
    '------------------

    Jim Cone
    San Francisco, USA


    "Matt" <Matt@discussions.microsoft.com> wrote in message
    news:B0694C87-E0B0-4383-A990-1DDA447BE95A@microsoft.com
    I have a procedure (procedure A) that calls a macro (Macro A). I need
    Procedure B to run Procedure A but to skip Macro A. Possible?????

  3. #3
    Matt
    Guest

    Re: Disabling a specific macro

    Jim: I appreciate the code, but this doesn't achieve what I am looking for.

    "Jim Cone" wrote:

    > Matt,
    >
    > Here is one way...
    > '-------------------------
    > Sub ProcA(Optional Arg As Boolean = True)
    > MsgBox "ProcA started"
    > If Arg Then Call DoSomething
    > End Sub
    >
    > Function DoSomething()
    > MsgBox "Function DoSomething started"
    > End Function
    >
    > Sub ProcB()
    > MsgBox "ProcB started"
    > Call ProcA(False)
    > End Sub
    >
    > Sub StartItUp()
    > Call ProcA
    > Call ProcB
    > End Sub
    > '------------------
    >
    > Jim Cone
    > San Francisco, USA
    >
    >
    > "Matt" <Matt@discussions.microsoft.com> wrote in message
    > news:B0694C87-E0B0-4383-A990-1DDA447BE95A@microsoft.com
    > I have a procedure (procedure A) that calls a macro (Macro A). I need
    > Procedure B to run Procedure A but to skip Macro A. Possible?????
    >


  4. #4
    Jim Cone
    Guest

    Re: Disabling a specific macro

    Matt,
    Am I supposed to guess?
    Jim Cone

    "Matt" <Matt@discussions.microsoft.com> wrote in message
    news:30DFAA88-6E4D-484B-9D2C-2AD660D109C2@microsoft.com...
    Jim: I appreciate the code, but this doesn't achieve what I am looking for.


    "Jim Cone" wrote:
    > Matt,>
    > Here is one way...
    > '-------------------------
    > Sub ProcA(Optional Arg As Boolean = True)
    > MsgBox "ProcA started"
    > If Arg Then Call DoSomething
    > End Sub
    >
    > Function DoSomething()
    > MsgBox "Function DoSomething started"
    > End Function
    >
    > Sub ProcB()
    > MsgBox "ProcB started"
    > Call ProcA(False)
    > End Sub
    >
    > Sub StartItUp()
    > Call ProcA
    > Call ProcB
    > End Sub
    > '------------------
    > Jim Cone
    > San Francisco, USA
    >
    >
    > "Matt" <Matt@discussions.microsoft.com> wrote in message
    > news:B0694C87-E0B0-4383-A990-1DDA447BE95A@microsoft.com
    > I have a procedure (procedure A) that calls a macro (Macro A). I need
    > Procedure B to run Procedure A but to skip Macro A. Possible?????
    >


+ 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