Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default 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




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default 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.





  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 184
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Marco Puzzled Excel Discussion (Misc queries) 3 July 30th 07 05:09 PM
Marco Help looper Excel Discussion (Misc queries) 2 May 12th 07 06:55 PM
I need some help with a Marco xgunda420x Excel Discussion (Misc queries) 2 August 2nd 05 01:43 PM
Marco Loi New Users to Excel 4 December 7th 04 08:52 PM
marco David Kuehl Excel Programming 4 September 18th 03 11:37 PM


All times are GMT +1. The time now is 02:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"