ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Marco to run every day at 12 (https://www.excelbanter.com/excel-programming/293260-marco-run-every-day-12-a.html)

bris

Marco to run every day at 12
 
Hi here

I've need some help to some macro programming.
I'm using excel for getting external data from an other database. Now I want
to build a macro that refresh the data at e.g 12 p.m. every day.
Any hint for making this macro that do this refreshing every day at a
defined time??

Br,
Brian



arno

Marco to run every day at 12
 
Hi bris,

to build a macro that refresh the data at e.g 12 p.m. every day.


one way is to enter your code to refresh data in the auto_open makro/event
of a workbook. start excel and the workbook with a "scheduled task" of
windows.

regards

arno



Bob Phillips[_6_]

Marco to run every day at 12
 
Brian,

Look at the OnTime method in VBA Help. This will enable you to schedule a
macro for a selected time.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"bris" wrote in message
...
Hi here

I've need some help to some macro programming.
I'm using excel for getting external data from an other database. Now I

want
to build a macro that refresh the data at e.g 12 p.m. every day.
Any hint for making this macro that do this refreshing every day at a
defined time??

Br,
Brian





Robin Hammond[_2_]

Marco to run every day at 12
 
Alternative, if Excel is running, you can use Auto_Open in say Personal.xls
and the Application.OnTime method to launch your update code.

Robin Hammond
www.enhanceddatasystems.com

"arno" wrote in message
...
Hi bris,

to build a macro that refresh the data at e.g 12 p.m. every day.


one way is to enter your code to refresh data in the auto_open makro/event
of a workbook. start excel and the workbook with a "scheduled task" of
windows.

regards

arno





arno

Marco to run every day at 12
 
Hi Robin,

the problem that i have with this sort of stuff is that it is absolutely not
sure what's going on. has user x the file open, did he start the macro, did
he close excel after starting, is he on holiday/ill/on tour etc. etc. etc.

this is why i'd recommend running a scheduled tasks, the PC/Server has to be
turned on and that's it.

arno

Alternative, if Excel is running, you can use Auto_Open in say

Personal.xls
and the Application.OnTime method to launch your update code.




bris

Marco to run every day at 12
 
Hi Arno

Thanks for your answer. I face a new problem.When using this scheduled task,
this opens the excel file, but stops when excel says "contain marco.
Is there a way of disable this popup message?

Br,
Brian
"arno" wrote in message
...
Hi Robin,

the problem that i have with this sort of stuff is that it is absolutely

not
sure what's going on. has user x the file open, did he start the macro,

did
he close excel after starting, is he on holiday/ill/on tour etc. etc. etc.

this is why i'd recommend running a scheduled tasks, the PC/Server has to

be
turned on and that's it.

arno

Alternative, if Excel is running, you can use Auto_Open in say

Personal.xls
and the Application.OnTime method to launch your update code.






arno

Marco to run every day at 12
 
Thanks for your answer. I face a new problem.When using this scheduled
task,
this opens the excel file, but stops when excel says "contain marco.
Is there a way of disable this popup message?


you have to set macro security to low to avoid this message.

this is a security risk, however, if you are working often with excel files
with macros you'll have to set security to low 'cause otherwise you'll go
crazy when prompted every time you open an excel file. usually, virus
scanners would interfere when opening a workbook with a macro-virus, if your
only protection against viruses is excel's macro security then you have a
problem anyway.

arno




All times are GMT +1. The time now is 05:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com