View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
NickHK[_3_] NickHK[_3_] is offline
external usenet poster
 
Posts: 415
Default Excel Worksheet and VBA

Justin,
Depends how you are getting your data.
If with ADO, you can use the recordset to move to the 2nd sheet after 500
records, or execute a query first to Count how many records will be
returned.
If with a querytable, then process after you have the data.

NickHK

"Justin" ...
I have this excel template that has vb code that looks at an access db
query,
and writes the contents of that query in the excel sheet.
I want to know if there is a way, depending on the count of records, to
split the data in 2 worksheets
for instances, if the query brings back 1000 records, I would like the
first
500 to be shown on the first worksheet and the second one on the second
worksheet.

Im using an array function currently, but all teh data is on the first
worksheet and I have to manually split it.