ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How can I insert a run macro command in the IF function? (https://www.excelbanter.com/excel-programming/358951-how-can-i-insert-run-macro-command-if-function.html)

emil

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.


Stewart[_5_]

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


emil

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



Stewart[_5_]

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


Stewart[_5_]

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



All times are GMT +1. The time now is 01:46 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com