Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Yan Yan is offline
external usenet poster
 
Posts: 33
Default Running Excel macro as a service

Hello,

I need to run an Excel (2003) macro as a service. Every day at 2 pm to copy
data from one worksheet to another.

I alredy have written a macro but how do I set it to run everyday at 2 PM ?

Thanks

Yan

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 154
Default Running Excel macro as a service

Yan,

You could set this macro to run in the Workbook_Open or Auto_Open command of
a workbook, set the workbook on a schedule to open. Ensure that you have a
command in your macro to close the book when it's done. You can save that
Workbook as "Scheduled Task" somewhere.

If you dont know how to schedule tasks in Windows, refer to StartHelp and
SupportSchedule a new task. Ensure that the workbook Starts In Microsoft
Excel under the Advanced section.

--
--Thomas [PBD]
Working hard to make working easy.


"Yan" wrote:

Hello,

I need to run an Excel (2003) macro as a service. Every day at 2 pm to copy
data from one worksheet to another.

I alredy have written a macro but how do I set it to run everyday at 2 PM ?

Thanks

Yan

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Running Excel macro as a service

Hi,

I assume the workbook is open.

Application.OnTime TimeValue("14:00:00"), "RunOnTime"
'Do things

Put this as the first line of your macro. Change the name "RunOnTime" to the
name of your macro. Run it and will run again every day at 2PM

Mike


"Yan" wrote:

Hello,

I need to run an Excel (2003) macro as a service. Every day at 2 pm to copy
data from one worksheet to another.

I alredy have written a macro but how do I set it to run everyday at 2 PM ?

Thanks

Yan

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,942
Default Running Excel macro as a service

hi
thomas has a good idea but just to give another option, you might try
looking at the ontime event in excel.
see this site for more details.
http://www.cpearson.com/excel/OnTime.aspx

Regards
FSt1

"Yan" wrote:

Hello,

I need to run an Excel (2003) macro as a service. Every day at 2 pm to copy
data from one worksheet to another.

I alredy have written a macro but how do I set it to run everyday at 2 PM ?

Thanks

Yan

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Running Excel macro as a service

Thomas,

You have the issue of enabling macros with this method.

Mike

"Thomas [PBD]" wrote:

Yan,

You could set this macro to run in the Workbook_Open or Auto_Open command of
a workbook, set the workbook on a schedule to open. Ensure that you have a
command in your macro to close the book when it's done. You can save that
Workbook as "Scheduled Task" somewhere.

If you dont know how to schedule tasks in Windows, refer to StartHelp and
SupportSchedule a new task. Ensure that the workbook Starts In Microsoft
Excel under the Advanced section.

--
--Thomas [PBD]
Working hard to make working easy.


"Yan" wrote:

Hello,

I need to run an Excel (2003) macro as a service. Every day at 2 pm to copy
data from one worksheet to another.

I alredy have written a macro but how do I set it to run everyday at 2 PM ?

Thanks

Yan



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 154
Default Running Excel macro as a service

Mike,

I hate that little annoying pop-up. I would advise that someone set their
Macro Security to low if they were going to use the scheduler. I have mine
set to low, so things run without me having to approve it. Some individuals
may like the validation that comes with knowing that what they have set in a
macro is accomplishing its task as scheduled... not me personally.

ToolsMacroSecurityLow for any users that wish to do this. Remember that
this will allow macros to run without your permission, so if you worry about
security to your computer and network, I advise against it.

--
--Thomas [PBD]
Working hard to make working easy.


"Mike H" wrote:

Thomas,

You have the issue of enabling macros with this method.

Mike

"Thomas [PBD]" wrote:

Yan,

You could set this macro to run in the Workbook_Open or Auto_Open command of
a workbook, set the workbook on a schedule to open. Ensure that you have a
command in your macro to close the book when it's done. You can save that
Workbook as "Scheduled Task" somewhere.

If you dont know how to schedule tasks in Windows, refer to StartHelp and
SupportSchedule a new task. Ensure that the workbook Starts In Microsoft
Excel under the Advanced section.

--
--Thomas [PBD]
Working hard to make working easy.


"Yan" wrote:

Hello,

I need to run an Excel (2003) macro as a service. Every day at 2 pm to copy
data from one worksheet to another.

I alredy have written a macro but how do I set it to run everyday at 2 PM ?

Thanks

Yan

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
Service invoice with a running inventory George Excel Discussion (Misc queries) 1 April 3rd 08 07:35 AM
Running excel macro by scheduler Dan Excel Discussion (Misc queries) 1 August 19th 07 11:48 PM
Excel running Word macro rsphorler Excel Discussion (Misc queries) 2 May 27th 07 01:19 AM
disable user running macro from Tools Macro Steve Simons Excel Discussion (Misc queries) 4 September 28th 06 06:28 AM
Running a Macro automatically from Excel Brakeshoe Excel Worksheet Functions 1 July 13th 05 11:23 PM


All times are GMT +1. The time now is 02:34 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"