Question
November 29, 2007 at 03:11 AM
chibuikei

How to write Excel VBA code for a returned ORACLE database query only

by chibuikei . Updated 18 years, 11 months ago

Hi guys,

I have an ORACLE database which I am using in Excel (front end). Lets say there are 300,000 records and I run a query and it returns 15,000 recors; I am trying to write a simple count (i.e. count = count + 1) macro which considers only the returned records (15,000) not the 300,000 but it keeps using the 300,000

I am using:
EXCEL VBA MACRO
For Each rng In ActiveSheet.UsedRange

after the query has been run but I keep getting 300,000.

How can I get the procedure to run on only the returned records of the query in Excel?

Thanks.

This discussion is locked

All Comments