编译错误:类型不匹配

时间:2018-05-06 01:24:43

标签: types mismatch

我收到编译错误:输入与以下代码不匹配。不确定问题是否在代码中。请提前帮助和谢谢。

Public Sub TransferTest()

Dim FiWkb As Workbook
Dim BkWkb As Workbook

'## Open both workbooks first:
Set FiWkb = "C:\Users\60050987\Desktop\FI INSPECTOR PROJECT\FI Inspector Data.xlsx"
Set BkWkb = Workbooks.Open("C:\Users\60050987\Desktop\FI INSPECTOR PROJECT\FI Inspector Data.xlsx")

'Now, transfer values from x to y:
BkWkb.Sheets("PhosData").Range("A2").Value = FiWkb.Sheets("DaysReport").Range("A2")

'Close BkWkb:
BkWkb.Close

End Sub

0 个答案:

没有答案