VB 6.0 - How to exit from nested subroutines in VBScript

Asked By Amit Bhole on 27-Dec-11 01:01 AM
I have subA, subB, subC these 3 subroutines.
subA have call to subB and subB have call to subC and for any condition, if i want to get out of SubA directly from SubC then How I can do this?
Jitendra Faye replied to Amit Bhole on 27-Dec-11 01:06 AM
Use break statement for this.
Riley K replied to Amit Bhole on 27-Dec-11 01:09 AM

in Vb Script use Exit Sub to come out of a routine


Sub CreateUser(strVar1, strVar2, strVar3, strVar4)
' Process values from recordset.
If (strVar1 = "") Then
' Necessary condition not met.
Exit Sub
End If
' More processing.
End Sub