How can I insert a run macro command in the IF function?
Thank of support.
Emil.
How can I insert a run macro command in the IF function?
Thank of support.
Emil.
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
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
>
>
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
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
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks