Macro script and scheduler

doriannjeshi

Active Member
Joined
Apr 5, 2015
Messages
338
Office Version
  1. 365
Platform
  1. Windows
Hello,

I need to fully automate a process which consists of getting data , copy paste, from 2 excel files , in a 3d. Then running a macro (which I already have recorded ) from this 3d excel file.
This macro calculates the data that got pasted and generates a new a book that gets saved and sends it via email.

The names of the 2 excels files are: number+ name of the report, i.e date_rpt_1 and date_rpt_2, because they get generated from a program daily
third excel file is named exlfile3

The part that I want to automate with a scheduler thus with a script batch file:
1. Open the 3 excel files: date_pt_1 , date_rpt_2 and exlfile3
2. Copy and paste the data from the 2 excel files onto the third. date_pt_1 sheet1 content needs to be pasted on sheet2 of exlfile3, and date_rpt_2 sheet1 needs to be pasted on sheet3 of exlfile3
3. Run the macro already present in exlfile3 , named macro1
4. Send the final file created with current date from macro1 via email


is it possible to do this fully automatically ?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Look into Windows Task Scheduler. I believe that for this to work, the pc where this is set up has to be running at least. Not sure about any user log ins. We had a dedicated desktop pc with its own profile that we never shut off and IT never rebooted so it was pretty reliable on a daily basis.
 
Upvote 1

Forum statistics

Threads
1,224,813
Messages
6,181,109
Members
453,021
Latest member
Justyna P

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