VBA to automate and email a sales report

moyay4

New Member
Joined
Jul 24, 2013
Messages
9
I know there are several threads related to this, but I have not found any to solve my problem. I am new to VBA.

I have the task of pulling results of an Access query into Excel, formatting them in a "standard" way (the data will be formatted the same everytime in every report), then AUTOMATICALLY emailing them at a pre-determined time everyday.

1. I have tried using the record macro function, and it works as far as pulling in query results and formatting them
2. Then, using the macro i recorded, i added onto it so that when I manually run this new macro, the whole thing gets emailed, but it is not automated. My issue is not having to manually run these macros and have them run as scheduled tasks.

Thank you so much for any help.
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Use the OnTime Method to schedule a procedure to be run at a specified time in the future (either at a specific time of day or after a specific amount of time has passed).

Here's a good step-by step guide
Scheduling Events With OnTime

Or do a web search for something like Excel ontime method site:www.mrexcel.com for many examples.
 
Upvote 0

Forum statistics

Threads
1,223,980
Messages
6,175,763
Members
452,668
Latest member
mrider123

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top