The third break is not needed. The following highlighted in yellow is where 
I would like the 2 breaks....


Sub Button1_Click()
Dim i As Long, j As Long, k As Long, s As String
i = 1
j = 1
Do
  s = Cells(i, 4).Value
  If s = "" Then Exit Do
  Worksheets("DATA").Select
  Cells(j, 1) = Worksheets("URL").Cells(i, 1).Value
  Cells(j, 2) = Worksheets("URL").Cells(i, 2).Value
  Cells(j, 3) = Worksheets("URL").Cells(i, 3).Value
  On Error Resume Next
  With ActiveSheet.QueryTables.Add(Connection:= _
      "URL;" & s, Destination:=Range("D" & CStr(j)))
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlInsertDeleteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlEntirePage
        .WebFormatting = xlWebFormattingNone
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
  End With
  On Error GoTo 0
  For k = j + 1 To ActiveSheet.UsedRange.Rows.Count + 1
    Cells(k, 1) = Cells(j, 1)
    Cells(k, 2) = Cells(j, 2)
    Cells(k, 3) = Cells(j, 3)
  Next k
  j = k
  Worksheets("URL").Select
  i = i + 1
  Loop
End Sub


On Monday, 1 September 2014 13:56:01 UTC-4, Bill Q wrote:

> Hi, 
>
> PSA.
>
> I am looking for two things to be modified with this macro:
>
> 1. A timer (in seconds) when it gets into the website and extracts 
> (retrieves) the line information that will allow it to pause.
>
> 2. A second timer (in seconds) to pause before it copies the information.
>
> Use 20 seconds as the default for both.
>
> 3. A third time in minutes that would cycle through all of this again once 
> completed.
>
> Use 120 minutes as the default.
>
> The idea is to appear to be browsing instead of scraping. 
>
> Thanks.
>
>  
>

-- 
Are you =EXP(E:RT) or =NOT(EXP(E:RT)) in Excel? And do you wanna be? It’s 
=TIME(2,DO:IT,N:OW) ! Join official Facebook page of this forum @ 
https://www.facebook.com/discussexcel

FORUM RULES

1) Use concise, accurate thread titles. Poor thread titles, like Please Help, 
Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will not get 
quick attention or may not be answered.
2) Don't post a question in the thread of another member.
3) Don't post questions regarding breaking or bypassing any security measure.
4) Acknowledge the responses you receive, good or bad.
5) Jobs posting is not allowed.
6) Sharing copyrighted material and their links is not allowed.

NOTE  : Don't ever post confidential data in a workbook. Forum owners and 
members are not responsible for any loss.
--- 
You received this message because you are subscribed to the Google Groups "MS 
EXCEL AND VBA MACROS" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to excel-macros+unsubscr...@googlegroups.com.
To post to this group, send email to excel-macros@googlegroups.com.
Visit this group at http://groups.google.com/group/excel-macros.
For more options, visit https://groups.google.com/d/optout.

Reply via email to