Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Web Queries in VBA

Without seeing the code, I would have to speculate how you are doing this.
You probably have a helper sheet which collects each query one at a time and
from there you copy it to a destination sheet. You must be keeping track of
the LastRow on the destination sheet so you will know where to place the
next query below the last (ie., LastRow = LastRow+2) to insert a blank row
between queries. At that point check to see if LastRow 64000. If it is,
add a new sheet and re-set the LastRow variable.

If LastRow 64000 Then
Worksheets.Add
LastRow = 1
End If

Also a tip to prevent file bloating with old Web Query names is to delete
the helper sheet at the end of the queries, and of course add a new helper
sheet at the start of the queries. Thousands of old web query names will be
embedded on that sheet which will continually add to the file size until
that sheet is deleted.

Mike F
"Pelham" wrote in message
ups.com...
Thanks to all of you who have assisted me learn more about VBA through
this News Group - it is working for me slowly ...!

In short, I have created a 20 or so line long VBA script which works
fine for me sometimes. It gets the latest residential real estate data
for Japan's 5 major cities and copies the relevant information straight
into an Excel WorkSheet for me. The code starts with "Sub Queries()"
and ends with "End Sub", but it generates some loops within the code
depending upon how many different web pages it needs to visit each
time. The number of web pages depends upon the number of available
properties in each city whenever I choose to Run the VBA Macro.

However, sometimes there are so many properties that I reach the last
line of the destination WorkSheet and it stops short of what I want...!
Can one of you kind folk please tell me what I have write into the
script to make it automatically open a new destination WorkSheet and
continue copying the data when the current WorkSheet reaches 64,000
lines, please. Also, can you tell where in the code I need to put this
VBA command, please?

Thanks in advance.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Queries MLK Excel Worksheet Functions 5 May 31st 08 05:18 PM
Web Queries Duane Excel Programming 1 August 23rd 05 10:49 PM
Web Queries Alistair[Data#3] Excel Discussion (Misc queries) 0 May 20th 05 12:39 AM
Web queries David Excel Programming 1 June 6th 04 03:59 PM
SQL Queries in VBA javydreamercsw[_3_] Excel Programming 1 February 19th 04 09:48 PM


All times are GMT +1. The time now is 12:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"