|
Private Sub ComboBox1_Change()
Dim CbB1 As String
Dim nodeID As Integer
Dim x As Long
CbB1 = ComboBox1.Value
With Worksheets("list")
For x = 2 To .Range("b65536").End(xlUp).Row
If .Cells(x, 2).Value = CbB1 Then
nodeID = .Cells(x, 2).Offset(, -1).Value
Exit For
End If
Next
End With
Worksheets("sheet1").Activate
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
>Range("A1").AutoFilter field:=3, Criteria1:=nodeID
ここでrangeクラスのautofilterメゾッドが失敗しましたと出ます
しかしautofilter絞り込みはnodeIDの値で絞り込めてます
なのにエラーが出る原因がわかりません
わかる方いたらお願いします!
Range("A1").CurrentRegion.Copy Sheets("list").Range("e1")
Range("a1").AutoFilter
End Sub
|
|