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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -