Error &H80070057

csvirtual

New Member
Joined
Oct 15, 2005
Messages
25
Hi!

Starting a Webquery out of a For Loop doesn't work although it works without the loop!??
The Error is this:

"System Error &H80070057 (-2147024809). The parameter is incorrect."

I couldn't find help on the web with it and the microsoft support site is no help with that topic.

by the way, the web query:

With ActiveSheet.QueryTables.Add(Connection:=.....
End With

Has anybody an idea?

thx
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
Can we see the rest of the code?
 
Upvote 0
Of course!

Code:
Sub oeffnen()

Dim i As Integer
Dim z As Integer
Dim a, b, c, d, e, f As Integer
Dim zeilenende As Integer
Dim neu As String
Dim bisdahin As Integer


 a = Range("H3") - 1 ' startmonth
 b = Range("G3") 'startday
 c = Range("I3") 'startyear
 d = Range("H4") - 1 'endmonth
 e = Range("G4") + 1 'endday
 f = Range("I4") 'endyear
 

 
bisdahin = Range("J6")
For i = 3 To Range("E1")
neu = "c:\daten\" & Range("b" & i)
Workbooks.Open neu
        
          
      For z = 1 To bisdahin
        Rows("8:8").Select
        Selection.Insert Shift:=xlDown
      Next z
      Range("A7").Activate
     With ActiveSheet.QueryTables.Add(Connection:="URL;http://table.finance.yahoo.com/table.csv?s=aa&d=9&e=20&f=2005&g=d&a=8&b=22&c=2005", Destination:=Range("A7"))
     End With
     
       
    Workbooks("aktualisieren.xls").Activate
    Worksheets("Werte").Activate
Next i

  
End Sub
 
Upvote 0

Forum statistics

Threads
1,206,761
Messages
6,074,781
Members
446,088
Latest member
Koustubh12

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top