If Forms("窗口").Opened Then
Dim lb2 As WinForm.Label = Forms("窗口").Controls("当前操作表")
Dim Str2 As String
Dim tab As WinForm.TabControl = forms("窗口").controls("TabControl2")
For Each c As WinForm.Control In tab.SelectedPage.Children
If Typeof c Is winform.Table Then
Dim tw As WinForm.Table = c
str2 = "正操作表名为:" & "【" & tw.Name & "】" & " 总行数:"
Exit For
Else
str2 = "当前窗口没有表"
End If
Next
lb2.text = str2
End If