|
Sub PSDdata()
'筛选
Dim Route1 As String
Dim PSDsheet As Workbook
Route1 = ThisWorkbook.Path & "\LCFC TNB PSD.xlsx"
Set PSDsheet = GetObject(Route1)
PSDsheet.Activate
ActiveSheet.Range("$A$1:$DJ$64958").AutoFilter Field:=5, Criteria1:="EMEA"
ActiveSheet.Range("$A$1:$DJ$64958").AutoFilter Field:=8, Criteria1:=Array( _
"L14_ODIN", "L14_ODIN_AMD", "L15_THOR", "L15_THOR_AMD", "L490_SOLO", "L590_LANDO", _
"P14S_1_DRIFT_AMD", "P14S_DRIFT_2", "P15_RAPTOR", "P15S_IRONHIDE_2", "P15V_THOR", _
"P17_BLACKBIRD", "P43S_DRIFT", "P53_NIGHTHAWK", "P53S_IRONHIDE", "P73_CHIRON", _
"X1 TABLET GEN 3", "X1_TRANSFORM_LARK", "X8_CLAM_KNOCKOUT", "X8_YOGA_RATCHET", _
"X9_CLAM_KO", "X9_YOGA_RT"), Operator:=xlFilterValues
'导入
Dim PSDrow As String
Dim PSDcol As String
Dim newTemp As String
PSDrow = PSDsheet.Sheets(1).Range("A65536").End(xlUp).Row
PSDcol = PSDsheet.Sheets(1).Range("A1:DJ1").Columns.Count
newTemp = " '" & ThisWorkbook.Path & "\[LCFC TNB PSD.xlsx]sheet1'!"
With ThisWorkbook.Sheet("ODM PSD").Range("C6:DL" & PSDrow + 5)
.FormulaR1C1 = "=" & newTemp & "RC"
End With
End Sub
一开始运行这个宏的时候,就出现“编译错误:方法和数据成员未找到”的提示,然后第一行出现黄色标记,倒数第四行出现蓝色标记;
求解!!
|
-
-
|