If ActiveSheet.AutoFilterMode = False Then MsgBox "The sheet does not have an AutoFilter" Exit Sub End If 'Get the sheet's AutoFilter object Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter For i = 1 To oAF.Filters.Count Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local For j = 1 To oAF.Range.Count MsgBox ret(j, 1) Next Next
Sub Macro1() If ActiveSheet.AutoFilterMode = False Then MsgBox "The sheet does not have an AutoFilter" Exit Sub End If 'Get the sheet's AutoFilter object Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local For i = 1 To oAF.Filters.Count For j = 1 To oAF.Range.Count / oAF.Filters.Count
MsgBox ret(j, i) Next Next End Sub 别人给出来一些代码,要学会融会贯通~
Sub Macro1() If ActiveSheet.AutoFilterMode = False Then MsgBox "The sheet does not have an AutoFilter" Exit Sub End If 'Get the sheet's AutoFilter object Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local For i = 1 To oAF.Filters.Count For j = 1 To oAF.Range.Count / oAF.Filters.Count
MsgBox ret(j, i) Next Next End Sub
Sub Macro1() If ActiveSheet.AutoFilterMode = False Then MsgBox "The sheet does not have an AutoFilter" Exit Sub End If 'Get the sheet's AutoFilter object Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local For i = 1 To oAF.Filters.Count For j = 1 To oAF.Range.Count / oAF.Filters.Count
MsgBox "The sheet does not have an AutoFilter"
Exit Sub
End If 'Get the sheet's AutoFilter object
Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter
For i = 1 To oAF.Filters.Count Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local
For j = 1 To oAF.Range.Count
MsgBox ret(j, 1)
Next Next
If ActiveSheet.AutoFilterMode = False Then
MsgBox "The sheet does not have an AutoFilter"
Exit Sub
End If 'Get the sheet's AutoFilter object
Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter
Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local
For i = 1 To oAF.Filters.Count
For j = 1 To oAF.Range.Count / oAF.Filters.Count
MsgBox ret(j, i)
Next Next
End Sub
别人给出来一些代码,要学会融会贯通~
If ActiveSheet.AutoFilterMode = False Then
MsgBox "The sheet does not have an AutoFilter"
Exit Sub
End If 'Get the sheet's AutoFilter object
Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter
Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local
For i = 1 To oAF.Filters.Count
For j = 1 To oAF.Range.Count / oAF.Filters.Count
MsgBox ret(j, i)
Next Next
End Sub
If ActiveSheet.AutoFilterMode = False Then
MsgBox "The sheet does not have an AutoFilter"
Exit Sub
End If 'Get the sheet's AutoFilter object
Set oAF = ActiveSheet.AutoFilter 'Loop through the Filters of the AutoFilter
Dim j As Integer, ret() ret = oAF.Range.FormulaR1C1Local
For i = 1 To oAF.Filters.Count
For j = 1 To oAF.Range.Count / oAF.Filters.Count
MsgBox ret(j, i)
Next Next
End Sub我这边提交咋老出错~?