请帮助调试:Run-time error '438' Object doesn't support this property or method
对于此代码将值从工作簿复制到另一个,我昨天这样做,但我忘了保存,我今天尝试,但它没有工作
Sub Listcustomer()
Dim y As Workbook
Dim x As Workbook
Set y = ActiveWorkbook
Set x = Workbooks.Open("\\myNetworkSharePath\myFileName.xlsx")
For i = 1 To x.Sheets.Count
y.ActiveSheet.Range("d" & i + 3).Value = x.Sheet(i).Range("b3").Value
Next i
End Sub
答案 0 :(得分:4)
错字。将表格更改为表格
y.ActiveSheet.Range("d" & i + 3).Value = x.Sheets(i).Range("b3").Value