joe_2
10 years agoContributor
Silly question of the day: Subroutines with subroutines
So I tried to do something and it didn't work, and I googled it and found it didn't work because vbscript can't do that... I was trying to put a subroutine within a subroutine. I have a script. ...
- 10 years ago
If I understand your situation correctly, you can use Class-Sub instead of Sub-Sub.
Give it a try:
In Unit1:
Class ClsProperty
Sub propertyName(strContent)
msgbox strContent
end Sub
End ClassSub MySub(strContent)
set obj = new ClsProperty
obj.propertyName(strContent)
End subIn Unit2:
'USEUNIT Unit1
sub Callee
Unit1.MySub("test")
End Sub