creatfilters 筛选之后记录当前筛选的表和筛选规则 If Vars("tbname") <> "" Then If Vars("tbname") = CurrentTable.Name Then Vars("tbname") = CurrentTable.Name tbfilters.Add(CurrentTable.Filter) Else Vars("tbname") = CurrentTable.Name tbfilters.Clear tbfilters.Add(CurrentTable.Filter) End If Else Vars("tbname") = CurrentTable.Name tbfilters.Clear tbfilters.Add(CurrentTable.Filter) End If
withdrawfilter 撤回筛选
If Vars("tbname") <> "" Then If Vars("tbname") = CurrentTable.Name Then Try Dim c As Integer = tbfilters.Count - 1 If c = 0 Then CurrentTable.Filter = "" tbfilters.Clear Else CurrentTable.Filter = tbfilters(c - 1) tbfilters.RemoveAt(c) End If Catch ex As Exception End Try Else Vars("tbname") = Nothing tbfilters.Clear End If End If