473,385 Members | 1,185 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Looping Marco thur url

Hello, I have create a marco that will go on a site and extract data. thru a web query.
I would like it to keep looping through the column that has all the urls. and stop at the last row containing a url...

SO....
Column K has the URLS starting at K2 these urls come in because a rss feed
Expand|Select|Wrap|Line Numbers
  1. Sub Macro1()
  2. '
  3. ' Macro1 Macro
  4. '
  5. ' Keyboard Shortcut: Ctrl+Shift+L
  6. '
  7. With ActiveSheet.QueryTables.Add(Connection:= _
  8. "URL;http://www.practicelink.com/jobs/297594/RSS/Physician/Cardiology/OH/Genesis%20HealthCare%20System" _
  9. , Destination:=Range("$O$2"))
  10. .Name = "Genesis%20HealthCare%20System"
  11. .FieldNames = True
  12. .RowNumbers = False
  13. .FillAdjacentFormulas = False
  14. .PreserveFormatting = True
  15. .RefreshOnFileOpen = False
  16. .BackgroundQuery = True
  17. .RefreshStyle = xlInsertDeleteCells
  18. .SavePassword = False
  19. .SaveData = True
  20. .AdjustColumnWidth = True
  21. .RefreshPeriod = 0
  22. .WebSelectionType = xlSpecifiedTables
  23. .WebFormatting = xlWebFormattingNone
  24. .WebTables = "6"
  25. .WebPreFormattedTextToColumns = True
  26. .WebConsecutiveDelimitersAsOne = True
  27. .WebSingleBlockTextImport = False
  28. .WebDisableDateRecognition = False
  29. .WebDisableRedirections = False
  30. .Refresh BackgroundQuery:=False
  31. End With
  32. End Sub
when the data is brought back into excel it transposes accross colums O-Y

Please help me solve the mind twister !!!!
Oct 19 '11 #1

✓ answered by Guido Geurs

Place the data in a NamedRange on the sheet.
I have placed it in "=CHS!$O$10:$P$20" for testing but you have to place it somewhere out of the used colls like "=CHS!$AA$1:$AB$10" or so.
Because the items are not always on the same place (more than one "Contact:" , more than one "Phone:"
number,...) we have to analise the data and place it on the right cell.
I have used 4 cols for "Contact:" and 2 for "Phone:"
You can change this number if there are URL with more data: just insert a Case in the right item and increase the numbers in the next items..

Expand|Select|Wrap|Line Numbers
  1.         '§ set data in cells and go 1 cell down
  2.         With ActiveCell
  3.             '§ move data
  4.             For URLDATArow = 1 To Range("URLdata").Rows.Count
  5.                 URLDATAdata = Range("URLdata").Cells(URLDATArow, 2).Value
  6.                 If URLDATAdata <> "" Then
  7.                     If Range("URLdata").Cells(URLDATArow, 1).Value <> "" Then
  8.                         URLDATAitem = Range("URLdata").Cells(URLDATArow, 1).Value
  9.                         URLDATAitemline = 1
  10.                     Else
  11.                         URLDATAitemline = URLDATAitemline + 1
  12.                     End If
  13.                     Select Case URLDATAitem
  14.                     Case "Contact:"
  15.                         Select Case URLDATAitemline
  16.                         Case 1
  17.                             .Offset(0, 4).Value = URLDATAdata
  18.                         Case 2
  19.                             .Offset(0, 5).Value = URLDATAdata
  20.                         Case 3
  21.                             .Offset(0, 6).Value = URLDATAdata
  22.                         Case 4
  23.                             .Offset(0, 7).Value = URLDATAdata
  24.                         End Select
  25.                     Case "Type of Recruiter:"
  26.                         .Offset(0, 8).Value = URLDATAdata
  27.                     Case "Phone:"
  28.                         Select Case URLDATAitemline
  29.                         Case 1
  30.                             .Offset(0, 9).Value = URLDATAdata
  31.                         Case 2
  32.                             .Offset(0, 10).Value = URLDATAdata
  33.                         End Select
  34.                     Case "Fax:"
  35.                         .Offset(0, 11).Value = URLDATAdata
  36.                     Case "Search Firm:"
  37.                         .Offset(0, 12).Value = URLDATAdata
  38.                     End Select
  39.                 End If
  40.             Next
  41.             '§ go 1 cell down
  42.             .Offset(1, 0).Activate
  43.         End With
  44.         ActiveSheet.Range("URLdata").Clear

37 2734
Guido Geurs
767 Expert 512MB
This will loop through the col:
Expand|Select|Wrap|Line Numbers
  1.          Range("K2").Activate
  2.          Do While ActiveCell.Value <> ""
  3.             ......
  4.             'Do things
  5.             ......
  6.             ActiveCell.Offset(1, 0).Activate
  7.          Loop
Oct 20 '11 #2
Thanks Guido, It loops pefectly but i would like to be able to do once it loops through the first url it opens web query and imports some data and transposes it across columnns O-Y and keeps doing these step over and over until it reaches the last entry.
i would like to show what i mean but this is a very confidental list of names cleint that i can not put on this site...
But if this is something that can be done Guido, I really do appreciate the help...
Oct 20 '11 #3
Guido Geurs
767 Expert 512MB
Just write your code in the 3 lines I have added with :

......
'Do things
......

If You need help, can't you attach a workbook with fictive names like Piet, Jan, ... and data ?
Just to see the structure of the sheet, what is on which place and where data need to be added?
Keep in mind that I can't use the web query ? or well ?
Oct 20 '11 #4
It worked for the first one brought the data in but it will not do it for the ones after that i going to try to attach the file i know last time there was some issues with that. Also im Rssfeeds i have in this file stopped updating as well.
Thanks Guido for you fast respones like always!!!!!
Attached Files
File Type: zip master'.zip (2.83 MB, 122 views)
Oct 20 '11 #5
Guido Geurs
767 Expert 512MB
Sorry but I have troubles loading it in Office 2003.
Is it possible to attach a file with less data like only the sheet with a row or 10 and the VBA macros ?
Oct 20 '11 #6
Okay i down sized the file thanks again
Attached Files
File Type: zip Master.zip (22.2 KB, 113 views)
Oct 20 '11 #7
Guido Geurs
767 Expert 512MB
This macro will search the data.
I have put the results in col "O" with a space of 10 rows.
Just set the results on the right location in the sheet.

Expand|Select|Wrap|Line Numbers
  1. Sub Macro1()
  2. '
  3. ' Macro1 Macro
  4. '
  5. ' Keyboard Shortcut: Ctrl+Shift+L
  6. '
  7. Dim ARRURL() As String
  8. Dim URLNAME As String
  9. Dim QTidx As Integer
  10. '§ go to first cell
  11.     Range("K2").Activate
  12. '§ loop through sheet
  13.     Do While ActiveCell.Value <> ""
  14.         '§ split URL on "/" in array
  15.         ARRURL = Split(ActiveCell.Value, "/")
  16.         With ActiveSheet.QueryTables
  17.             With .Add(Connection:="URL;" & ActiveCell.Value, _
  18.                         Destination:=Range("$O" & ActiveCell.Row * 10))
  19.                 '§ search .Name !! URL can or can NOT end on "/"
  20.                 If InStrRev(ActiveCell.Value, "/") = Len(ActiveCell.Value) Then
  21.                     .Name = ARRURL(UBound(ARRURL) - 1)
  22.                 Else
  23.                     .Name = ARRURL(UBound(ARRURL))
  24.                 End If
  25.                 .FieldNames = True
  26.                 .RowNumbers = False
  27.                 .FillAdjacentFormulas = False
  28.                 .PreserveFormatting = True
  29.                 .RefreshOnFileOpen = False
  30.                 .BackgroundQuery = True
  31.                 .RefreshStyle = xlInsertDeleteCells
  32.                 .SavePassword = False
  33.                 .SaveData = True
  34.                 .AdjustColumnWidth = True
  35.                 .RefreshPeriod = 0
  36.                 .WebSelectionType = xlSpecifiedTables
  37.                 .WebFormatting = xlWebFormattingNone
  38.                 .WebTables = "6"
  39.                 .WebPreFormattedTextToColumns = True
  40.                 .WebConsecutiveDelimitersAsOne = True
  41.                 .WebSingleBlockTextImport = False
  42.                 .WebDisableDateRecognition = False
  43.                 .WebDisableRedirections = False
  44.                 .Refresh BackgroundQuery:=False
  45.             End With
  46.             '§ clear QueryTables
  47.             For QTidx = .Count To 1 Step -1
  48.                 .Item(QTidx).Delete
  49.             Next
  50.         End With
  51.         With ActiveCell
  52.             .Offset(1, 0).Activate
  53.         End With
  54.     Loop
  55. End Sub
Attached Files
File Type: zip Master contract of all jobs_v1.zip (25.3 KB, 123 views)
Oct 21 '11 #8
OmG!!!! this working Perfect!!! thank you i i am now closer then every i would like to know if how do i transpose the data when it extracts it out of the web.
Oct 21 '11 #9
Thanks Guido you rock!!!
Oct 21 '11 #10
Guido Geurs
767 Expert 512MB
Place the data in a NamedRange on the sheet.
I have placed it in "=CHS!$O$10:$P$20" for testing but you have to place it somewhere out of the used colls like "=CHS!$AA$1:$AB$10" or so.
Because the items are not always on the same place (more than one "Contact:" , more than one "Phone:"
number,...) we have to analise the data and place it on the right cell.
I have used 4 cols for "Contact:" and 2 for "Phone:"
You can change this number if there are URL with more data: just insert a Case in the right item and increase the numbers in the next items..

Expand|Select|Wrap|Line Numbers
  1.         '§ set data in cells and go 1 cell down
  2.         With ActiveCell
  3.             '§ move data
  4.             For URLDATArow = 1 To Range("URLdata").Rows.Count
  5.                 URLDATAdata = Range("URLdata").Cells(URLDATArow, 2).Value
  6.                 If URLDATAdata <> "" Then
  7.                     If Range("URLdata").Cells(URLDATArow, 1).Value <> "" Then
  8.                         URLDATAitem = Range("URLdata").Cells(URLDATArow, 1).Value
  9.                         URLDATAitemline = 1
  10.                     Else
  11.                         URLDATAitemline = URLDATAitemline + 1
  12.                     End If
  13.                     Select Case URLDATAitem
  14.                     Case "Contact:"
  15.                         Select Case URLDATAitemline
  16.                         Case 1
  17.                             .Offset(0, 4).Value = URLDATAdata
  18.                         Case 2
  19.                             .Offset(0, 5).Value = URLDATAdata
  20.                         Case 3
  21.                             .Offset(0, 6).Value = URLDATAdata
  22.                         Case 4
  23.                             .Offset(0, 7).Value = URLDATAdata
  24.                         End Select
  25.                     Case "Type of Recruiter:"
  26.                         .Offset(0, 8).Value = URLDATAdata
  27.                     Case "Phone:"
  28.                         Select Case URLDATAitemline
  29.                         Case 1
  30.                             .Offset(0, 9).Value = URLDATAdata
  31.                         Case 2
  32.                             .Offset(0, 10).Value = URLDATAdata
  33.                         End Select
  34.                     Case "Fax:"
  35.                         .Offset(0, 11).Value = URLDATAdata
  36.                     Case "Search Firm:"
  37.                         .Offset(0, 12).Value = URLDATAdata
  38.                     End Select
  39.                 End If
  40.             Next
  41.             '§ go 1 cell down
  42.             .Offset(1, 0).Activate
  43.         End With
  44.         ActiveSheet.Range("URLdata").Clear
Attached Files
File Type: zip Master contract of all jobs_v3.zip (26.9 KB, 113 views)
Oct 22 '11 #11
Thanks again Guido, for this. I love how it is working... I just have one more question, If thats ok? I would like to know if change the rss feed for another company besides CHS how can i change the code to do the same thing no matter what company it is. The first time you did i was able to change the name of the rss feed to any company but the imported data was not transposing like how it is now" Application-defined or object- defined error is the message i get when i try to change the company name.
Again thanks for your help.
Oct 22 '11 #12
Guido Geurs
767 Expert 512MB
You have to look how the HTML page is structured!
If you are using IE than click on: Menu - View - Source or save page to your disk and look at it with an HTML viewer, MSword...
Tables can have a name like table 1 in RSS:
Expand|Select|Wrap|Line Numbers
  1. ....
  2.     <table id="LogInDialog" style="dis....
  3.  
And you can address it with:
Expand|Select|Wrap|Line Numbers
  1.  .WebTables = "1"
or
Expand|Select|Wrap|Line Numbers
  1.  .WebTables = "LogInDialog"
Or no name like in the RSS pages.
Than you have to count the tables
In the RSS pages the data is stored in the 6th table (in or macro= .WebTables = "6"):
Expand|Select|Wrap|Line Numbers
  1. ....
  2.     <table border="0" cellpadding="0" cellspacing="0" width="100%">
  3.         <tr>
  4.      <th>
  5.          Contact:
  6.      </th>
  7.      <td>
  8.          Joanne Anderson<br />Coordinator<br />
  9.          Community Health Systems<br />
  10.  
  11.          Franklin, TN 37067
  12.      </td>
  13.      <td rowspan="5">
  14.  
  15.      </td>
  16.         </tr>
  17.         <tr>
  18.      <th>....
  19.  
For another company besides CHS you have to find the data table in the HTML and adapt the macro with(if the type of page is in the same place in the URL !!):
Expand|Select|Wrap|Line Numbers
  1.  select case ARRURL(5)
  2.  case "RSS"
  3.     'code for RSS HTMLs
  4.  case "???"
  5.     'code for ??? HTMLs
  6. ...
  7.  end select
If the type of page is not on the same place, you can use:
Expand|Select|Wrap|Line Numbers
  1.  if Instr(ActiveCell.Value,"RSS") then
  2.     'code for RSS HTMLs
  3.  elseif Instr(ActiveCell.Value,"RSS") then
  4.     'code for ??? HTMLs
  5. ...
  6.  else
  7.     Msgbox"URL not found..."
  8.  end if
  9.  

or write a second macro.
Oct 23 '11 #13
Thanks guido, This is soo confusing to me..... Ok in order for me to do this is first thing set up rss feed right? then name the range where i would like other import data to end up. Or how do i go about setting this up each time so i can get these great results. Thanks Guido i wish i had just half of you programming skill because i trully suck!!!!
Oct 24 '11 #14
Hey Guido!!! thansk for all your help I finally got it to work.your the best!!!!
Oct 24 '11 #15
Hey Guido for all the other one that i set up are working just perfect but this one is mal funcution do you think it the code or the web that is making it do this? I attached a copy of this file
Attached Files
File Type: zip KIngs Daughter.zip (20.9 KB, 94 views)
Oct 25 '11 #16
Guido Geurs
767 Expert 512MB
On the second line there is an URL (http://www.practicelink.com/jobs/270.../KY/King's Daughters Medical Center/)
with 3 columns !
You are capturing data outside the named range!
The old range with 2 columns is not cleaned properly (still data in the 3th column), so the named range is moved => error.
solution: dimension the named range with 3 columns like:
=$O$10:$Q$25
You can also use 3 columns for the others.
Attached Files
File Type: zip Book2_v1.zip (17.2 KB, 100 views)
Oct 25 '11 #17
Hey Guido... I have a question If i need this automactially happen everytime I press refresh or refresh happens everytime i open the excel sheet and update the sheet with the new Rss feed that just entered could the code you wrote just start automaticallty but from the row that does not contain and data instead of from the top... Thanks for you help always.....
Nov 2 '11 #18
I have change the code just a little to catch another pieace of data of that same site it is working up until it needs to paste into excel. I would appreciate the help...
I have attached a file.
Attached Files
File Type: zip Bytes.com.zip (25.6 KB, 103 views)
Nov 7 '11 #19
Guido Geurs
767 Expert 512MB
This table is not table "6" but table "5" in the URL (starts at line 1400) so in reading the URL the code must be:
Expand|Select|Wrap|Line Numbers
  1. ...
  2.         .WebFormatting = xlWebFormattingNone
  3.         .WebTables = "5"
  4.         .WebPreFormattedTextToColumns = True
  5. ...
Also you can't use the same structure to dump the data in the sheet.
The table structure is=
============================================
Hospital Employed Psychiatry Opportunity

Kings Daughters Medical Center

King's Daughters Medical Center
Ashland , KY 41101
600,000 service area , 2201 Lexington Avenue

Job ID: 266822
Accepts J1s: No
Loan Assistance: Yes
Practice Type: Hospital Employee
Apply Now EmailFacebookTwitterShareThisShareThis
============================================

Also: the contents of the first column is not " trFacility:", " Job ID:", ... with space at beginning !!! but "Job ID: "

If you want the data of column1 for the first 8 rows, you just have to read them and dump in the sheet.

PS: for safer reasons I have placed the "URLdata" range to "AA1:AB20"
Attached Files
File Type: zip Copy of Book2_v1 USe this one_v2.zip (24.8 KB, 107 views)
Nov 7 '11 #20
Thats why your an expert and im not!!!! thanks for this im really thankful. I followed the steps of what you have told me in the past posts but My biggest problem was getting the data to display after it came over and wanted it to display the name of the hospital and the address also, Thanks again guido for the help. I am so close thanks to you...
Nov 7 '11 #21
Guido Geurs
767 Expert 512MB
Is this the data in the 1st column on the 5th row?
If so, see attached demo: just set the data from the named range in the offset cell with:
Expand|Select|Wrap|Line Numbers
  1.             .Offset(0, 6).Value = Range("URLdata").Cells(5, 1).Value
PS: I have also done some modifications on the definition and clearing of the named range.
Attached Files
File Type: zip Copy of Book2_v1 USe this one_v3.zip (25.4 KB, 112 views)
Nov 9 '11 #22
Hey Guido thanks for getting back to me... I dont know what it is it not getting the hospital name for me
----------------------------------------
----------------------------------------
Hospital Employed Psychiatry Opportunity

Kings Daughters Medical Center

King's Daughters Medical Center
Ashland , KY 41101
600,000 service area , 2201 Lexington Avenue

Job ID: 266822
Accepts J1s: No
Loan Assistance: Yes
Practice Type: Hospital Employee
Apply Now EmailFacebookTwitterShareThisShareThis
-------------------------------------------------
-------------------------------------------------

I would like the 4th and the 5th line of data I tried eveything you told me to do before I looked at the source of the web page and nothing seems to be working for me...
Nov 10 '11 #23
Guido Geurs
767 Expert 512MB
!! the 4th line is blanc !!!
Must it not be the 3th ??? (see attachment)
----------------------------------------
----------------------------------------
[1]Hospital Employed Psychiatry Opportunity
[2]
[3]Kings Daughters Medical Center
[4]
[5]King's Daughters Medical Center
[6]Ashland , KY 41101
[7]600,000 service area , 2201 Lexington Avenue
....
-------------------------------------------------
-------------------------------------------------
Attached Files
File Type: zip Copy of Book2_v1 USe this one_v4.zip (25.8 KB, 115 views)
Nov 10 '11 #24
Thanks Guido Im learning so much from you... I Realize that I said Line 4 from the Example but what i meant was really line 5 and 6 from the data shown above thanks for making it clear to me. I was able fix it with some teaking and tuning and i was proud of myself that i with your help (As Always) i was able to tune it. Now i would like to move it over from the columns that it is being ported into now into another column after column Z. Thanks so much for always getting Back... Guido (!!!!Apperiacted!!!!!)
Nov 10 '11 #25
Guido Geurs
767 Expert 512MB
To copy a column fast, use arrays like:( to copy col M to Z)
(M1 is title)
Expand|Select|Wrap|Line Numbers
  1. Sub macro_copy_Col()
  2. Dim ARRAYDATA As Variant
  3.     ARRAYDATA = Range("M2").Resize(Range("M2").End(xlDown).Row, 1)
  4.     Range("Z2").Resize(UBound(ARRAYDATA, 1), 1) = ARRAYDATA
  5. End Sub
Nov 11 '11 #26
Thanks Guido, I finally completed this task all thanks to you!!!!
Nov 11 '11 #27
Guido Geurs
767 Expert 512MB
This is working for CHS contracts (no row jump)
Expand|Select|Wrap|Line Numbers
  1. Sub Capturedata()
  2. '§ Keyboard Shortcut: Ctrl+Shift+L
  3. Dim ARRURL() As String '§ for splitting the URL
  4. Dim QT As QueryTable '§ QueryTables in sheet
  5. Dim URLDATArow As Integer
  6. Dim URLDATAitem As String
  7. Dim URLDATAdata As String
  8. Dim URLDATAitemline As Integer
  9. '§ go to first cell
  10.     Range("K2").Activate
  11. '§ loop through sheet
  12.     Do While ActiveCell.Value <> ""
  13.         '§ split URL on "/" in array
  14.         ARRURL = Split(ActiveCell.Value, "/")
  15.         With ActiveSheet.QueryTables
  16.             With .Add(Connection:="URL;" & ActiveCell.Value, _
  17.                         Destination:=Range("URLdata"))
  18.                 '§ search .Name !! URL can or can NOT end on "/"
  19.                 If InStrRev(ActiveCell.Value, "/") = Len(ActiveCell.Value) Then
  20.                     .Name = ARRURL(UBound(ARRURL) - 1)
  21.                 Else
  22.                     .Name = ARRURL(UBound(ARRURL))
  23.                 End If
  24.                 .FieldNames = True
  25.                 .RowNumbers = False
  26.                 .FillAdjacentFormulas = False
  27.                 .PreserveFormatting = True
  28.                 .RefreshOnFileOpen = False
  29.                 .BackgroundQuery = True
  30.                 .RefreshStyle = xlInsertDeleteCells
  31.                 .SavePassword = False
  32.                 .SaveData = True
  33.                 .AdjustColumnWidth = True
  34.                 .RefreshPeriod = 0
  35.                 .WebSelectionType = xlSpecifiedTables
  36.                 .WebFormatting = xlWebFormattingNone
  37.                 .WebTables = "6"
  38.                 .WebPreFormattedTextToColumns = True
  39.                 .WebConsecutiveDelimitersAsOne = True
  40.                 .WebSingleBlockTextImport = False
  41.                 .WebDisableDateRecognition = False
  42.                 .WebDisableRedirections = False
  43.                 .Refresh BackgroundQuery:=False
  44.             End With
  45.         End With
  46.         '§ clear QueryTables
  47.         For Each QT In ActiveSheet.QueryTables
  48.             QT.Delete
  49.         Next
  50.         '§ set data in cells and go 1 cell down
  51.         With ActiveCell
  52.             '§ move data
  53.             For URLDATArow = 1 To Range("URLdata").Rows.Count
  54.                 URLDATAdata = Range("URLdata").Cells(URLDATArow, 2).Value
  55.                 If URLDATAdata <> "" Then
  56.                     If Range("URLdata").Cells(URLDATArow, 1).Value <> "" Then
  57.                         URLDATAitem = Range("URLdata").Cells(URLDATArow, 1).Value
  58.                         URLDATAitemline = 1
  59.                     Else
  60.                         URLDATAitemline = URLDATAitemline + 1
  61.                     End If
  62.                     Select Case URLDATAitem
  63.                     Case "Contact:"
  64.                         Select Case URLDATAitemline
  65.                         Case 1
  66.                             .Offset(0, 15).Value = URLDATAdata
  67.                         Case 2
  68.                             .Offset(0, 16).Value = URLDATAdata
  69.                         Case 3
  70.                             .Offset(0, 17).Value = URLDATAdata
  71.                         Case 4
  72.                             .Offset(0, 18).Value = URLDATAdata
  73.                         End Select
  74.                     'Case "Type of Recruiter:"
  75.                    ' Select Case URLDATAitemline
  76.                        ' Case 1
  77.                       '  .Offset(0, 18).Value = URLDATAdata
  78.                      '  End Select
  79.                     Case "Phone:"
  80.                         Select Case URLDATAitemline
  81.                         Case 1
  82.                             .Offset(0, 19).Value = URLDATAdata
  83.                         Case 2
  84.                             .Offset(0, 20).Value = URLDATAdata
  85.                         End Select
  86.                     Case "Fax:"
  87.                       .Offset(0, 21).Value = URLDATAdata
  88.  
  89.                     End Select
  90.                 End If
  91.             Next
  92.             '§ go 1 cell down
  93.             .Offset(1, 0).Activate
  94.         End With
  95.         ActiveSheet.Range("URLdata").Clear
  96.     Loop
  97. '    Call Macro1
  98.  End Sub
Nov 27 '11 #28
Thanks Guido I am Able to do this for every Rss feed I bring in from this site with a little modification I am Very happy with this Thanks so much for helping me with this Again again again Thanks Soooo much!!! Your the Best!!
Nov 29 '11 #29
Hey Guido Just a thought... Can these to code be combined in order to perform this action together. right now what i do is run one macro then call up the other when that one finishes... I was just thinking it would make it easier. Right now as we speak i am running the first marco on 11,000 and if works great the after that it runs the second part. it takes a whole 24 hours to complete the task fully. Thanks
Dec 16 '11 #30
Hey Guido,
It been A long time..
I dont know what happened with this code that you helped me delvop. I think the website changed there source code because the marco works but no data is beening imported. I tryed in all the examples that we have copied to this forum and it not working Please Guido call you help me tell what is wrong...
Thanks for you help
Feb 13 '12 #31
Guido Geurs
767 Expert 512MB
Hello Sandy,
It has been a long time since I have worked on this problem and I don't have the latest code any more (there where also 3 call's on this project).
Please can you attach the workbook with some URL's and the latest macro in?
Feb 14 '12 #32
OK no problem I have attached the folder Thanks for your help.
Attached Files
File Type: zip Bytes.zip (16.4 KB, 95 views)
Feb 14 '12 #33
Guido Geurs
767 Expert 512MB
This is a new lay-out for "http://www.careermd.com/physicians/ViewListing.aspx?ListingID=289021711"!
Which data do you want from this URL?

This is the only data I get from the 2 tables in it:

table 1 ===========================================
Tampa Hospitalist Opportunity —
Clearwater, Florida
IN Compass Health, Inc. | Morton Plant Hospital
Job ID: 289021711 | J1s Y/N?: Unspecified
================================================== =


table 2 ===========================================
Contact Person: Matt Griffith , Inside Physician Researcher
Phone: (877) 837-0941 ext. , Fax:
================================================== =
Feb 15 '12 #34
Thanks Guido. I attached the wrong work bok my mistake. I have attached the correct one now what is going on is that the marco that goes into the URL in column K and export the data is working but there is no data being place where it needs to go. that is what leads me to be leave that the website change the source code. PLease let me know what you think. Any help is apperciate.
Attached Files
File Type: zip Bytes.co Folder Rss.zip (34.8 KB, 121 views)
Feb 15 '12 #35
Guido Geurs
767 Expert 512MB
Attached is a tool to view the tables in an URL.

HOW:
- Show the Form with the macro : Show_URL_Table_Viewer

- Paste the URL addresses in column "A"
- Go with the command buttons (UP, LEFT, RIGHT, DOWN) to the Cell with the URL address (not to fast ! = let the sheet the time to update!)
- Click on "GET URL ADDRESS" to put the URL in the textbox
- Select the table number you want to see with the Up and Down spinbuttons.
- Click on "Show URL Table" to load the table in the range = "B1" to "xxxx"

- Click on the Help button to see this help text.
Attached Files
File Type: zip Table viewer_v3.zip (25.6 KB, 96 views)
Feb 16 '12 #36
Guido Geurs
767 Expert 512MB
The data are now in table=7 (check with tool).
Attached is the new code.
Attached Files
File Type: zip KIngs Daughter medicial center feed New1_v3.zip (31.4 KB, 115 views)
Feb 16 '12 #37
Guido that table finder is soo cool i love how it works. for table3 it would soo neat if it would bring you the email address also. but i know the email is hidden by a types of fire walls. I love this new tools thanks for your help after all this time.
Feb 16 '12 #38

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Wei-Chao Hsu | last post by:
Hi, I read a Marco definition in a source file, which is shown below. #define BEGIN_EVENT_TABLE(theClass, baseClass) \ const wxEventTable theClass::sm_eventTable = \ {...
5
by: liwei | last post by:
how can i let the follow marco works in VC6.0 #define TRACE_BEGIN(function) #ifdef DEBUG \ printf("----------------Enterinto%s-----------------\n",function);\ time_t beginTime,endTime;\...
45
by: Trevor Best | last post by:
I did a test once using a looping variable, first dimmed as Integer, then as Long. I found the Integer was quicker at looping. I knew this to be true back in the 16 bit days where the CPU's (80286)...
5
by: masood.iqbal | last post by:
My simplistic mind tells me that having local variables within looping constructs is a bad idea. The reason is that these variables are created during the beginning of an iteration and deleted at...
1
by: Diva | last post by:
Hi, I have a data grid in my application. It has 20 rows and I have set the page size as 5. I have a Submit button on my form and when I click on Submit, I need to loop through the rows in the...
7
by: Plissken.s | last post by:
Hi, If I define a template wich uses the __FILE__ marco in a .h file and I have class which creates/uses that template (in a .cpp file). What will the __FILE__ marco expand to? the .h which...
0
by: anthon | last post by:
Hi all - first post! anywho; I need to create a function for speeding up and down a looping clip. imagine a rotating object, triggered by an action, and slowly decreasing in speed, till it...
20
by: Ifoel | last post by:
Hi all, Sorry im beginer in vb. I want making programm looping character or number. Just say i have numbers from 100 to 10000. just sample: Private Sub Timer1_Timer() if check1.value= 1...
4
by: wbosw | last post by:
I'm trying to take a word (stEAdy) and find the index positions of the uppercase characters(2,3) in the word. I have them stored in an array (positionarray). Then I reverse the word and set all...
2
by: Davaa | last post by:
Dear all, I am a student making a MS Form application in C++. I would ask a question about "Timer". Sample code which I am developing is below. private: System::Void...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.