#1
|
|||
|
|||
Run a macro each minute?
Hi out there, Im kinda new on excel. I made a page that query data from an external xlm, and it works great. Except that I need to update it manual, I record a macro that update it. But how can I schedule this macro to be run each minute? //yabbah |
#2
|
|||
|
|||
It cant be true that none know how to execute a macro each minute?
|
#3
|
|||
|
|||
Hi,
Please use below code and call your macro in this... Quote:
|
#4
|
|||
|
|||
But that code gived a dialogbox that I need to press OK on, thats not a solution. This will be on a screen just like a viewer, so I would like to have it automatic.
I use xml-dataimport, and the "refresh every XX minutes" and all other options in the connection-settings is grayed out. So I cant use excels inbuilt feature for auto-update. As intelligent excel is, and how much there can be done in it, it would supprice me much if it cant be done. |
#5
|
||||
|
||||
Hi,
The intention of Krishna's reply was to outline one potential approach and that you adapt it to suit your needs. Where Krishna's code shows a message box you should change that to call your macro instead. That aside, I think you should look into using Timers. Have a look at the Application.OnTime method in your VBA helpfile. For further information and examples you can read this excellent article by Chip Pearson: http://www.cpearson.com/excel/OnTime.aspx For now I recommend that you avoid using the Windows Timers: unless they are used with due caution and care they may cause Excel to crash under certain circumstances. Good luck! |
#6
|
|||
|
|||
I solved it using this line in the vba,
Application.OnTime Now + TimeValue("00:00:10"), "nameOfMyMacro" Thanks all for your help. |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to write the degree, minute second format in excel | Jamal NUMAN | Excel | 12 | 07-09-2018 11:44 PM |
How do I assign a macro to a button when the macro is in my personal workbook? | foolios | Excel Programming | 2 | 07-27-2011 02:41 PM |
Upgraded from Outlook 2003 to 2010, after a minute, Outlook closes on its own | Ckingfly | Outlook | 3 | 06-12-2011 07:43 AM |