Dim nms() As String = {"第一列","第二列","第三列"} Dim visible As boolean If e.Sender.Text = "隐藏" Then e.Sender.Text = "显示" Visible = False ElseIf e.Sender.Text = "显示" Then e.Sender.Text = "隐藏" Visible = True End If For Each nm As String In nms Tables("表A").Cols(nm).Visible = Visible Next