I thought it was possible to prevent the need of a variable for a macro function?
I tried the 'SUB' style but it doesn't work for multiline macro's:
Called like:
or:
I tried the 'SUB' style but it doesn't work for multiline macro's:
Code:
Function MacroResult( ByVal nResult As Long ) As Long Function = nResult End Function Macro Function MTEST1(p1) ' much more code here (not single line capable) End Macro = MacroResult( p1 ) Macro MTEST2(p1) = MTEST1(p1)
Code:
MTEST1( 100 ) MsgBox Format$( MTEST1( 100 ) )
Code:
MTEST2( 100 ) MsgBox Format$( MTEST2( 100 ) )
Comment