Search : in
By :

Automation of running excel macros

Last answer on Sep 3, 2009 7:59:41 am BST Ped, on Jun 10, 2009 12:53:44 pm BST 
 Report this message to moderators

Hello,

I have a macro in excel which needs to be run twice a day and i dont even want to open the excel sheet. How can i make this process automatic?

If i can convert the macro to Exe file, maybe i can put it to my task manager. Please advice.

Many thanks

Ped

Configuration: Windows Vista
Firefox 3.0.10

Best answers for « Automation of running excel macros » in :
How to convert Excel into PDF? ShowHow to convert Excel into PDF? Here is a small tips about how to convert your excel files into PDF for your presentation. Step 1 PDF995 is software that gets installed on your computer which enables you to print any sources of document to...
Excel tips : How to insert date in a cell ShowExcel tips : How to insert date in a cell Below are some tips on how to insert date and time in an excel cell for a specific purpose:- To insert current date, press CTRL + ; in the chosen cell. To insert current time, press CTRL+...
Colouring cells on conditions ShowColouring cells on conditions There are many pratical functions under Excel which is not commonly used. Example: If you wish a cell automatically turns red (or other formatting border, frame etc) under one condition: a result, a...

1

Excelguru, on Jun 10, 2009 3:20:48 pm BST

Hi
Add the macro code to excel open event
You can open an excel file and make it to run twice a day
by creating a new task and adding its path to "Scheduled Tasks" within double quotes under (Start>>Programs>>Accessories>>System Tools) Winners are losers who got up and gave it one more try. -Dennis DeYoung
My Interests are financial Modelling and custom excel development.

Reply to Excelguru

2

Ped, on Jun 10, 2009 8:08:38 pm BST

Hi and thanks a lot.

Now I can schedule opening the excel. What I don't know how to do is:

1. To add macro code to excel open event
2. To close the excel file and save it automatically.


Many thanks again

Ped

Reply to Ped

3

Excelguru, on Jun 14, 2009 12:40:32 pm BST
  • +1

Hi

1. In the VBE window, in the 'Thisworkbook' page select workbook then add the following three lines
Private Sub Workbook_Open()
' add code here
End Sub
2.workbooks("Workbookname").save

workbooks("Workbookname").close Winners are losers who got up and gave it one more try. -Dennis DeYoung
My Interests are financial Modelling and custom excel development.

Reply to Excelguru

5

smd, on Sep 3, 2009 5:52:53 am BST
  • +1

Hi there,

i have a similar problem as posted by another user

i have used windows scheduler to open the workbook every night at 12

i need to run a particular macro from a particular module.

in my auto_open event i already have 3 macros which will run on start up. i need to skip these three macro and run my specific macro every night.

any help will b highly appreciated.

thanks

Reply to smd

6

Excelguru, on Sep 3, 2009 7:46:11 am BST

Put a condition for the 3 existing macros not to ru if time is 12 AM and add the new macro without this condition A wise man once said, 'I complained that I had no shoes unti­l I met a man who had no feet.'
I am interested in financial Modelling and custom excel deve­lopment with excel macros.

Reply to Excelguru

7

smd_excel, on Sep 3, 2009 7:52:46 am BST
  • +1

Hi,
thanks for the reply but cud u help me with the code for creating the timing criteria

Reply to smd_excel

8

 Excelguru, on Sep 3, 2009 7:59:41 am BST
  • +1

If Hour(Time) = "24" then A wise man once said, 'I complained that I had no shoes until I met a man who had no feet.'
I am interested in financial Modelling and custom excel development with excel macros.

Reply to Excelguru

4

Ped, on Jun 14, 2009 6:30:56 pm BST

Thanks a lot. You saved me so many working hours!

Reply to Ped