'主过程:
Private Sub Abc()
Def'Def中怎么写,才能在这里 Exit sub ?
Text1.Text = ""
End Sub
'子过程:
Public Sub Def()
'……
'这里怎么写?
'……
End Sub
Private Sub Abc()
Def'Def中怎么写,才能在这里 Exit sub ?
Text1.Text = ""
End Sub
'子过程:
Public Sub Def()
'……
'这里怎么写?
'……
End Sub
Public blnRun As BooleanPrivate Sub Abc()
If Not blnRun Then Exit Sub 'Def中怎么写,才能在这里 Exit sub ?
Text1.Text = ""
End Sub
'子过程:
Public Sub Def()
'……
'这里怎么写?
If True Then '看你下面有语句,所以这里设置某个条件,不需要可去掉该if
blnRun = False
Exit Sub
End If
'……
End Sub
Option Explicit
Dim flag As Boolean'主过程:
Private Sub Abc()
'Def 'Def中怎么写,才能在这里 Exit sub ?
Def
If flag Then Exit Sub
Text1.Text = ""
End Sub
'子过程:
Public Sub Def()
'……'这里怎么写?
If ?? Then
flag = True
Exit Sub
End If'……
End Sub
Public Fucntion Def() as Boolean
'……
'……
'不想退出主过程返回True
'Def = True
'想退出主过程返回False
'Def = False
End Fucntion '主过程:
Private Sub Abc()
If Def() = False Then
Exit Sub
End If
Text1.Text = ""
End Sub
if Def then
exit sub
else 'Def中怎么写,才能在这里 Exit sub ?
Text1.Text = ""
end if
End Sub
'子过程:
Public function Def() as boolean
'……
'这里怎么写?
if x then
Def=true
else
def=false
end if
'……
End Sub