Excel vba nested inner subs like in python, java -


in other programming languages there way put code separate function gets called first one, instance, in java:

public void exercise()  {        run();        jump();        walk(); } 

is there way in vba put subs 1 another? tried to

sub test1()       test2() end sub  sub test2()     msgbox("test2") end sub 

but gives mistake.

you without parentheses:

sub test1()       test2 end sub 

parentheses needed enclose arguments in order assign output of function variable. if sub took arguments, like:

sub test1()       test2 "hello", "world" end sub  sub test2(arg1, arg2)      msgbox arg1 & " - " & arg2 end sub 

Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -