Dear All,
I am new to module and VBA.
My database has 200 ID and associated hourly data for each ID. I want to extract hourly data for each ID to Excel file. Currently, I run the query and copy-paste the result to an Excel worksheet. Then change ID in the query and run again a with a particular UnitID and then export it to Excel (or copy-paste). There are more than 200 ID. It would be too time-consuming to do it manually. I don't know enough about Macros but my intuition is there might be a customer-written Macro looping though all 200 units running the same query with different UnitID and export the result automatically to the same Excel files (to different worksheet). Thanks!
Gene