Hi,

Since you are declaring your variable as integer you are getting this
error..

check this line..  *Dim i As Integer, j As Integer, k As Integer, s As
String*

since integer can hold max value upto  32,767, post which you will get
overflow error & your macro will get stopped..

Instead of integer you can declare variable as variant to hold more data.


Cheers!!


On Tue, Jun 3, 2014 at 2:17 AM, Bill Q <ronsmith...@gmail.com> wrote:

> Hi,
>
> Please find macro below.
>
> Thanks.
>
> Sub Button1_Click()
> Dim i As Integer, j As Integer, k As Integer, 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 Friday, May 30, 2014 5:27:09 PM UTC-4, Bill Q wrote:
>
>> Hi,
>>
>> I am using Excel 2010. I have a macro web query that downloads various
>> information. It works fine. No issue there. The only issue that I have is
>> that it will stop if it encounters more than 33 or 34 thousand rows of
>> information. I have unchecked the box in "advanced options" that will not
>> alert me if the number of cells is over 33,554. I thought that would do the
>> trick - but no success.
>>
>> Any suggestions ?
>>
>> 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.
>

-- 
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