Excel vba: How to programatically find what has called a macro -
Excel vba: How to programatically find what has called a macro -
i trying write macro has portion reacts differently depending on whether called straight button in worksheet, or called indirectly macro. want able have react differently depending on other macro has called it
in case, if macro activated manually button or if has been run particular other macro, pops msgbox allow user know has been completed successfully, if same macro run macro, want skip step.
is there way this?
you passing arguments subroutines. here's basic example:
sub test(number, displaymessage) msgbox ("the number " & number) if displaymessage msgbox ("you ran b sub") end sub sub asub() phone call test(4, false) end sub sub bsub() phone call test(7, true) end sub
try running both asub , bsub. hope helped.
excel excel-vba
Comments
Post a Comment