0
我正在嘗試編寫一個簡單的代碼來循環瀏覽日文站點中的某些.xls文件。在創建框架時,我遇到了Runtime 1004問題 - www.e-stat ...找不到,但這些文件都可用。這是代碼。如果有人能告訴我我哪裏出錯了,那會很棒。 PS - 我試過在互聯網上尋找答案。運行時錯誤1004 - 打開工作簿超鏈接
Sub automate()
Dim wb As Workbook
Dim filepath As String
Thswb = ThisWorkbook.Name
'Worksheets("data").Activate
'Dim namearray As Integer
Dim MyArray(1 To 4) As Integer
MyArray(1) = 0
MyArray(2) = 1
MyArray(3) = 2
MyArray(4) = 7
For i = 1 To UBound(MyArray)
Workbooks.Open "www.e-stat.go.jp/SG1" & "/estat/XlsdlE.do?sinfid=00002723131" & MyArray(i)
'Do stuff
'In progress
ActiveWorkbook.Close
Next i
End Sub
謝謝你Jeeped。我真的很感激它。再次感謝! – 2014-10-07 23:33:24