I'm Stumped with VBA & XML
Hi All,
I'm pulling the hair out and have googled myself silly, but I just can't work this out. I'm hoping Shaun or one of the other Excel experts can help me. On Sheet2 Cells A3-A10 I have a list of URLs representing one meeting. A3 = h**p//tatts.com/pagedata/racing/2013/2/9/BR1.XML etc The macro I'm having hassles with - Code:
What I'm trying to achieve is to replace the URL (in blue) with code that will read Sheet2 Cell A3 and then loop to read Cell A4 etc - I'm pretty sure I can handle the looping..... This XML stuff is doing my head in.... Thanks, Den |
not sure on the looping but this will pull the address from A3
Address = Range("A3") xmldoc.Load Address |
Excellent, stugots.
Works brilliantly. For the rest I altered the code to - Code:
then at the end of the macro - A = A + 1 so that the next pass A = 4 ie. Cell(A4) Thanks again, mate Den |
No prob Dennis
|
Ain't it great when the answer was so simple , yet achieved awsome results for the member.
|
Quote:
I've just finished this workbook (bugs not withstanding) just ran it for last saturday and was done in under three minutes..... Some tweaking to do (not dealing with abandoned meetings too well and some other odd results) but will get there... |
Good for you Dennis G
Is that Program adaptable to SuperTab or does the Flash mess it up? |
1 Attachment(s)
Quote:
Anyway here it is for your pleasure.... |
Nice one Dennis, if I could make one suggestion, adding the line -
Application.ScreenUpdating = False as the first line TodaysFields macro speeds it up considerably. Would also add - Application.ScreenUpdating = True as the last line. |
Thanks, stugots, that helped a bit.
I'm still in awe of downloading all races on last MC day (107 races) in under 3 minutes..... |
1 Attachment(s)
version 2 is completed -
* results are now numericals * win divs ranked * scratchings fixed * abandoned races noted * blank row between venues for easier cut/paste * venue list displayed on front page |
Hi Dennis, if you move the screenupdating line right to the end as below the code runs much quicker, for example yesterdays results completes in 20 seconds.
TransposeRaceCodes Application.ScreenUpdating = True End Sub |
Thanks mate, flying now...
A fix for abandoned - in the LoadRaceDetails macro two thirds of the way down after ' Abandoned the 9 should be replaced with a 4. "=IF(RC[-5]<>"""",IF(R1C[9]=""ABANDONED"",""ABD"",""""),"""")" should be - "=IF(RC[-5]<>"""",IF(R1C[4]=""ABANDONED"",""ABD"",""""),"""")" I'm using my laptop and quite often forget the numlock key and when I type a number it doesn't appear :-[ |
1 Attachment(s)
attached is the one i use.
just add the date in sheet 3 b1,c1,&d1 and some field info comes out in sheet 1 and the results in sheet 4. the choose the "both for date" button update as you wish good luck aussie |
All times are GMT +10. The time now is 10:53 AM. |
Powered by: vBulletin Version 3.0.3
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.