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
Post a Comment