2
提取範圍已丟失或 非法字段名稱。Microsoft Excel運行時錯誤'1004'
代碼如下...
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Row = 2 And Target.Column = 2 Then
'calculate criteria cell in case calculation mode is manual
Worksheets("ProductList").Range("C3").Calculate
Worksheets("SalesData").Range("Table_HESCO") _
.AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("ProductList").Range("C2:C3"), _
CopyToRange:=Range("B18:V18"), Unique:=False
End If
End Sub