Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Automate simple process to run at 8 am daily

I've got an excel file which will remain open in a PC which is left on 24x7.
At say, 8:00 am daily, I need a sub to copy a sheet: Live (codename), then
insert a new sheet, do a paste special as values & formats, then rename the
new sheet as the date in ddmmm format, eg: 31Dec, and move this to be the
leftmost sheet. Then to save the file. Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Automate simple process to run at 8 am daily

This is usually accomplished using an operating system utility. If
you are using Windows, you can do this via the Windows Task Scheduler
(see http://www.iopus.com/guides/winscheduler.htm).

I am not a Linux user, but I believe that you use the "cron" utility
(see http://www.linuxhelp.net/guides/cron/) to do this on a system
running Linux.

Alan

  #3   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Automate simple process to run at 8 am daily

Thanks, but I have to do it in/via Excel. Any thoughts on the sub, pl?


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Automate simple process to run at 8 am daily

I do not understand the problem with involving the operating system.
The idea is that the task scheduler simply opens the workbook at the
appropriate time. The workbook contains the VBA code you want to run,
and you can use the Workbook_Open() event (see http://www.ozgrid.com/VBA/auto-run-macros.htm)
to make the code run automatically. If you like

If, for some reason, you cannot do this, the Excel workbook containing
the VBA code msut be open when it needs to run. Are you assuming
that?

If so, you can use the Now() function to get the current time and
loop until you reach or pass the trigger time. If you have not
passed the trigger time, you can use Sleep() (see
http://www.your-save-time-and-improv...eep-excel.html)
to wait for a while to check again.

If other VBA code will be running, you may need to insert "DoEvents"
in the loop.

Alan




  #5   Report Post  
Posted to microsoft.public.excel.programming
ron ron is offline
external usenet poster
 
Posts: 118
Default Automate simple process to run at 8 am daily

On Dec 31, 5:38*am, Max wrote:
I've got an excel file which will remain open in a PC which is left on 24x7.
At say, 8:00 am daily, I need a sub to copy a sheet: Live (codename), then
insert a new sheet, do a paste special as values & formats, then rename the
new sheet as the date in ddmmm format, eg: 31Dec, and move this to be the
leftmost sheet. Then to save the file. Thanks


Max...Take a look at the "On Time" method in VBA help...Ron


  #6   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Automate simple process to run at 8 am daily

I do not understand the problem with involving the operating system.
The problem is I don't have admin rights, and I don't want to delve into
that area

If, for some reason, you cannot do this, the Excel workbook containing
the VBA code msut be open when it needs to run. Are you assuming
that?


Yes, think I did say that in my posting's opening line:
I've got an excel file which will remain open in a PC which is left on
24x7.



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Automate simple process to run at 8 am daily


Using "OnTime", as Max suggested, is a better option.

Alan
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
way to automate this process rodchar Excel Discussion (Misc queries) 4 June 26th 09 06:52 PM
Macro to automate process Journey Excel Discussion (Misc queries) 0 June 13th 08 02:53 PM
Sub to automate process Max Excel Programming 4 October 12th 07 03:03 PM
need to automate process sand Excel Discussion (Misc queries) 3 August 3rd 07 06:20 PM
Automate an Excel process msnate Excel Programming 1 July 23rd 06 12:46 PM


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