Retrieving consecutive pages in web query What's wrong here?

Hello
How come I keep always getting the same 100 items instead of the next
100?  I wrote this code , of which I do not understand every line but
something similar worked in other queries.
Could you help?   I'd be very gratefull.
Herman
Sub Macro5()
Dim i As Integer
For i = 0 To 3
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://www.iec-iab.be/nl/diensten/zoeken/Pages/
Zoeken.aspx?all=true&page=i+1&count=100&ext=on&intern=on" _
        , Destination:=Range("$A$1").Offset(i * 103, 0))

        .Name = "Zoeken.aspx?all=true&page=i
+1&count=100&ext=on&intern=on"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingAll
        .WebTables = 5
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
        .Delete
    End With
Next i
End Sub
0
Herman
1/20/2010 5:59:20 PM
excel.programming 6508 articles. 2 followers. Follow

1 Replies
614 Views

Similar Articles

[PageSpeed] 24

true&page=" & i + 1 & "&count=100&
also comment out .name
I would have written using a refresh and moving the result to another sheet.
-- 
Don Guillett
Microsoft MVP Excel
SalesAid Software
dguillett@gmail.com
"Herman" <herman@maws.be> wrote in message 
news:ee94c89d-87ff-4fa8-863c-155193d5e7c2@u41g2000yqe.googlegroups.com...
> Hello
> How come I keep always getting the same 100 items instead of the next
> 100?  I wrote this code , of which I do not understand every line but
> something similar worked in other queries.
> Could you help?   I'd be very gratefull.
> Herman
> Sub Macro5()
> Dim i As Integer
> For i = 0 To 3
>    With ActiveSheet.QueryTables.Add(Connection:= _
>        "URL;http://www.iec-iab.be/nl/diensten/zoeken/Pages/
> Zoeken.aspx?all=true&page=i+1&count=100&ext=on&intern=on" _
>        , Destination:=Range("$A$1").Offset(i * 103, 0))
>
>        .Name = "Zoeken.aspx?all=true&page=i
> +1&count=100&ext=on&intern=on"
>        .FieldNames = True
>        .RowNumbers = False
>        .FillAdjacentFormulas = False
>        .PreserveFormatting = True
>        .RefreshOnFileOpen = False
>        .BackgroundQuery = True
>        .RefreshStyle = xlInsertDeleteCells
>        .SavePassword = False
>        .SaveData = True
>        .AdjustColumnWidth = True
>        .RefreshPeriod = 0
>        .WebSelectionType = xlSpecifiedTables
>        .WebFormatting = xlWebFormattingAll
>        .WebTables = 5
>        .WebPreFormattedTextToColumns = True
>        .WebConsecutiveDelimitersAsOne = True
>        .WebSingleBlockTextImport = False
>        .WebDisableDateRecognition = False
>        .WebDisableRedirections = False
>        .Refresh BackgroundQuery:=False
>        .Delete
>    End With
> Next i
> End Sub 

0
Don
1/20/2010 6:59:17 PM
Reply:

Similar Artilces:

retrieve an AVERAGE of a range using VLOOKUP to locate start/end d
Can I calculate the average of a range based on VLOOKUP? In other words, can I get Excel to "look up" the respective START / END dates of an investment position listed in Sheet 1 and then go and locate those 2 distinct cell values in in a different sheet (Sheet 2) utilizing VLOOKUP function and then return the calculated AVERAGE of the cells within that range back into Sheet 1? Appreciate any thoughts if doable in Excel in any way? tAKE A LOOK AT AverageIFS and see if that does what you want. If it were me, I'd probably enter the formula manually, record the resu...

How does one publish web pages/create a site via Microsoft? Looki.
In the ocena of techincal jargon, I cannot find the means to publish (or transfer) images to my website. Please advise. Thanks, John ...

Count records in a query
Hello! I have a query that runs pretty slow, and I'd like to alert the user before running the query. So I have a source query for my slow query, and I'd like to count the records in my source query and estimate the time the query will take to run. How can I do this in VBA? -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-modules/201005/1 DCount("*","Your Source Query Name") This will give you the number of records in the Query "AtleDreier via AccessMonster.com" wrote: > Hello! >...

pages missing
I am creating a 46 page newsletter in Pub. I convert all pages to JPEGs and then insert them to pub pages. I save and close the document. When I reopen it to work on it again, I'll have several random pages missing...not always the same ones. Also, when I try to save it to a disc, it just creates a shortcut. Help! Thanks, Vali Why are you converting pages to .jpgs? And you don't save a file to a disk. Save it to your hard drive and then write the file to the disk with whatever CD-writing software you prefer to use. -- JoAnn Paules MVP Microsoft [Publisher] "vali...

make notecards two per page inside and outside
I'm trying to make notecards that print outside and inside, two per page on embossed cardstock. Can't find template in word or publisher formats, or even Avery that will allow me to do this HELP!!!! Go to File, Page setup and create the size of your choice; also do an Insert, Page. When you go to print it will tell you it will print two copies per sheet. -- Don Vancouver, USA "Ruthie" <Ruthie@discussions.microsoft.com> wrote in message news:4AD82E0E-5BB1-48F8-81ED-91FA9CDA01EE@microsoft.com... > I'm trying to make notecards that print outside and insi...

How to retrieve the string from dialog box
Hi All, Does anyone know how to retrieve a string in IDC_STATIC on a dialog box? I have to print out a report with an application version at the bottom line for users to be aware of it in my application. I don't know how to retrieve the string in IDC_STATIC control on a dialog box. It would be very nice that someone let me know how to do that without calling the dialog box. TIA Hwasoo Lee Back 9 wrote: > Hi All, > > Does anyone know how to retrieve a string in IDC_STATIC on a dialog box? > I have to print out a report with an application version at the bottom line &g...

Retrieve mouse position
Hi, I am writing an app in which I need to retrieve the mouse coordinates even when it mouse is outside the main frame. How do I do it? Thanks! xg >Hi, I am writing an app in which I need to retrieve the mouse coordinates >even when it mouse is outside the main frame. How do I do it? Thanks! Have you tried calling GetCursorPos? If you want to know when the mouse is moving I think you'll need to use a hook - have a look at SetWindowsHookEx WH_MOUSE. Dave IN addition to David's answer, you have not stated the problem you are trying to solve. For examp...

Page Break in the Report
Hi How can I insert a page break in the report if possible? Thank you, Samuel There's a page break object in the tool box (it shows the bottom of a page of paper over top the top of a page of paper with a little right-pointing arrow between them). It only actually causes a page break if its Visible property is True. That means you can make it invisible, and make it visible when you actually want a page break. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Samuel" <samuel.shulman@ntlworld.com> wrote in message news:uPPW5TCt...

Retrieving messages
Help, I mistakenly restored all the defaults on Outlook (the computer did not crash) losing all the messages and address book. I have had to set up the application from scratch entering account details etc. Question is: are all the messages and contacts still held on the computer even the program needs to be set up again and, if so, how do I retrieve them. Any assistance greatly appreciated. Thanks. P89 If you made a backup of your system or My Documents, search for a file called Outlook.pst. If you have that you can import all the information. Al "peterson89" <peterson...

Sorting Wrong
Greetings, My Excel worksheet is sorting numbers wrong. It's doing this: 94 92 9 9 9 84 84 8 8 8 76 72 71 7 7 Is there anyway to get it to sort normally? Like: 94 92 84 76 72 71 9 9 9 8 8 8 7 7 Make the cells formatted as number with 0 decimals "Sam Weber" <sam@hostradius.com> wrote in message news:193c901c44c9d$b98dc930$a101280a@phx.gbl... : Greetings, : : My Excel worksheet is sorting numbers wrong. It's doing : this: : : 94 : 92 : 9 : 9 : 9 : 84 : 84 : 8 : 8 : 8 : 76 : 72 : 71 : 7 : 7 : : Is there anyway to get it to sort normally? Like: : : 94 : 92 : 84 :...

"eco" option to reduce paper (1st page only, max margin, font, re.
People are lazy, so they don't think on the best option before printing, i suggest creating an option to use printers on a more "eco" way by default. for example more and more people reply on each other mail, and we don´t print, but when we do, generally we only need the last message and we get all the mail (7, 8 pages to waste if we manage to stop before the 20 get out), if an "eco" option could be select, only the 1st page would came out, (or the one on the screen), with maybe other setings like using margins to the max, a smaller font with readabi...

template + page numbers
I have a template with a cell reserved for the page number. I need to print the template 200 times with the page number incrementing for each page printed. In other words, the first page printed to read 1, second page 2, the third 3, etc. How can I get this cell to increment 1 for each page printed. Thank you in advance. You could use the workbook_beforeprint() event to increment the cell Private Sub Workbook_BeforePrint(Cancel As Boolean) Worksheets("Sheet1").Range("A1").Value = _ Worksheets("Sheet1").Range("A1").Value + 1 End Sub See ...

Retrieving comment using range name
I have singular cells in different places referenced by their range names. Is there a way to get the comments corresponding to the referenced ranges (singular cells)? Thanks in advance, Tomek Set testrng = Range("A3:A4", "C3:C4") comment1 = testrng(1).Comment.Text .... commentn = testrng(n).Comment.Text Stefi „topola” ezt írta: > I have singular cells in different places referenced by their range > names. Is there a way to get the comments corresponding to the > referenced ranges (singular cells)? > Thanks in advance, > Tomek > > did yo...

relation ship and query
How many table can I make relation between them in Query Design view? Because this message appear to me after I add 3 table only The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in your SQL statement. (Error 3258) You can add 32 tables in a query, but since you can query other queries, in theory you could probably build as many as 992. I'm sure you'd run out of memory way before that. Your error message is being c...

how can I print different text in one page
I want to print index card but two different one in one page , I couldn't do it ? Are you using card stock that has two prescored cards on one sheet? -- JoAnn Paules MVP Microsoft [Publisher] "mohsen" <mohsen@discussions.microsoft.com> wrote in message news:AC1EBB00-6F99-469F-B743-A36BF8499A12@microsoft.com... >I want to print index card but two different one in one page , I couldn't >do > it ? ...

Retrieving lost messages after Synchronization in Outlook Express
Setup for my hotmail messages to be downloaded to Outlook Express. When tried to connect to see an old message, didn't realize that it was setup to auto synch. My messages were deleted from hotmail, and are now lost on Outlook Express after synching. Is there anyway to retrieve the lost messages from Outlook Express? I really needed some of the items in there, and had downloaded them so they wouldn't be lost. Thanks! ...

Retrieve
Hi how do i retrieve all the postings i have posted in this group. sometimes forget of where i posted my i will be glad to get to know how to pull out my own questions cheers Click on your name to view the profile...Then click 'Recent posts by this user' http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?&lang=en&cr=US&guid=&sloc=en-us&dg=microsoft.public.excel.misc&p=1&tid=467a932d-65b6-4bb1-98e1-25def53a971a&mid=467a932d-65b6-4bb1-98e1-25def53a971a -- Jacob (MVP - Excel) "Amin" wrote: > Hi how ...

Retrieving
Is there any way to retrieve how many web pages are opened by Internet Explorer, and what URLs are opened by it, from another process? I searched for IHTMLDocument5 and so on, however, I could't find any hint. Please reply. Thanks in advance. Regards, Hyun-jik Bae ...

Will not print to edge of page
I am using Publisher 2007 and want to print almost to the edge of the page. I have changed the margin guides to 0. However the writing is cutting off at about 1/2 inch from the edge. It looks fine in the edit view mode, but in print preview I see it is cutting off the writing, and of course it is doing the same in the actual print. I just can't figure out why that is. If you know, can you share that with me? Thanks. SG Sherree Gorman wrote: > I am using Publisher 2007 and want to print almost to the edge of the > page. > I have changed the margin guides to 0. However ...

No free/busy information could be retrieved
Recently migrated from 5.5 to exch2003, once the 5.5 machine was turned off, users free/busy information is not available, if the 5.5 machine is turned on it is available, does anyone know what I need to so that the information is available after 5.5 is turned off? -- Thanks Sounds like you forgot to re-home the System Public Folders (specifically the Free/Busy Public Folder) before turning the old server off. Follow the details in this article for a list of things you should do in order to retire the 5.5 server. http://support.microsoft.com/default.aspx?scid=kb;en-us;307917 - referen...

PRINTING EXTRA BLANK PAGES
XP/2003 I have a document set up as a 12-page booklet, 11x8.5/landscape format. So I expect it to print as three 11x8.5 sheets of paper, print on both sides, which, when folded, results in a 12-page booklet with three blank pages at the end. When I view the document in print preview, this is exactly what I see. In normal view, when I look at the little map of the pages at the bottom of the screen in normal view that one uses to navigate to any page in the document, it indicates there are 12 pages and the last three are blank. However, when I print the document, it prints SIX letter...

Form pages
Is it possible to have a two page form and only print the first page or second page when needed.? Depending on your design, you should be able to use the File/Print dialog box selection to print 1 of 2, or 2 of 2 pages. But, forms are made for data entry, and viewing... not printing. Better that you develop a rptPageOne and a rptPageTwo and select either for printing from your form. -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccsolutions/index.html "Find a job that you love... and you'll never work a day in your life." &quo...

Crosstab query 01-20-08
The standard access crosstab query uses the PIVOT Format([Date],”mmm”) In(“Jan”,”Feb”,”Mar”,…) to make columns for the (12)months of the year, how would you Format the Date for (52) weeks of the year? The week should start on Sunday - right? -- thank You Gus Chuch schrieb: > The standard access crosstab query uses the PIVOT Format([Date],”mmm”) > In(“Jan”,”Feb”,”Mar”,…) to make columns for the (12)months of the year, how > would you Format the Date for (52) weeks of the year? > The week should start on Sunday - right? Use the DatePart function to get the week, e.g. PIV...

Online Pages In Testing Phase
Hi If i am using paypal services free of cost(paypal is giving me free services for trying their tool just for 1 week) for accepting payments from registrants, how can one differentiate between this online page(from source code) from that of the normal one(if i am paying to paypal after test period) .I am using asp.net for my site. ...

retrieving my questions
I am still learning how to use this system to it's fullest. How can I locate the questions I have asked in the past? Is there an easy way? -- Zunibear in Montana It depends upon how you are viewing this forum. If using Outlook Express, make sure your view is set for all messages. You could then sort by "From". If you don't want to loose the threaded response view, don't sort, but you probably have a copy of any post you did in the "Sent Items" folder in Outlook Express. Look there, find the one you are interested in, and scroll to that date in the f...