参考代码
For Each a As OBJECT In Tables("表A").grid.Parent.controls For Each b As OBJECT In a.controls msgbox(b.text) If B.text = "加载树" Then b.CanCloseTabs = False b.CanAutoHide = False End If NextNext