+ Reply to Thread
Results 1 to 5 of 5

How can I insert a run macro command in the IF function?

  1. #1
    emil
    Guest

    How can I insert a run macro command in the IF function?

    How can I insert a run macro command in the IF function?
    Thank of support.
    Emil.


  2. #2
    Stewart
    Guest

    Re: How can I insert a run macro command in the IF function?

    Use the call command to run a macro from anywhere in a macro.

    i.e. Assume you have a macro called "OtherMacro", that you require
    running if the contents of a range, called "Answer" is equal to 5:-

    Sub Example()

    If Range("Answer").value = 5 then
    Call OtherMacro
    End If

    End Sub


  3. #3
    emil
    Guest

    Re: How can I insert a run macro command in the IF function?

    Thanks millions,
    It was very useful for me
    Emil

    "Stewart" a scris:

    > Use the call command to run a macro from anywhere in a macro.
    >
    > i.e. Assume you have a macro called "OtherMacro", that you require
    > running if the contents of a range, called "Answer" is equal to 5:-
    >
    > Sub Example()
    >
    > If Range("Answer").value = 5 then
    > Call OtherMacro
    > End If
    >
    > End Sub
    >
    >


  4. #4
    Stewart
    Guest

    Re: How can I insert a run macro command in the IF function?

    Use the call command to run a macro from anywhere in a macro.

    i.e. Assume you have a macro called "OtherMacro", that you require
    running if the contents of a range, called "Answer" is equal to 5:-

    Sub Example()

    If Range("Answer").value = 5 then
    Call OtherMacro
    End If

    End Sub


  5. #5
    Stewart
    Guest

    Re: How can I insert a run macro command in the IF function?

    Use the call command to run a macro from anywhere in a macro.

    i.e. Assume you have a macro called "OtherMacro", that you require
    running if the contents of a range, called "Answer" is equal to 5:-

    Sub Example()

    If Range("Answer").value = 5 then
    Call OtherMacro
    End If

    End Sub


+ 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