Option Explicit
Private Sub Command1_Click()
Dim frm As Form
For Each frm In Forms
If Left(frm.Name, 6) = "frmSub" Then
Unload frm
End If
Next
frmsub1.Show
End Sub
Private Sub Command2_Click()
Dim frm As Form
For Each frm In Forms
If Left(frm.Name, 6) = "frmSub" Then
Unload frm
End If
Next
frmsub2.Show
End Sub
Private Sub Command3_Click()
Dim frm As Form
For Each frm In Forms
If Left(frm.Name, 6) = "frmSub" Then
Unload frm
End If
Next
frmsub3.Show
End Sub
为什么会报frmsub未定义变量,,等待。。。。