现在似乎没有好的办法解决
这样试试
Select Case e.Link.Name Case "表A.表B" MainTable = Tables("表A") Tables("表A.表C").Visible= False Tables("表A.表B").Visible= True Case "表A.表C" MainTable = Tables("表A") Tables("表A.表B").Visible= False Tables("表A.表C").Visible= True Case Else MainTable = Tables(e.Link.Name)End Select