Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default time of day automation

I am trying to write a VBA code to run a certain module
application at a certain time. If someone could point me
in the write direction I can figure the rest out.
Basically I am going to open a certain xls file on
startup and that xls file will contain the VBA
programming to do everything else. This is what I have
but it will not work.

Sub a()
Application.OnTime TimeValue("12:00"), "Test"
End Sub
Sub Test()


Workbooks.Open "C:\Documents and Settings\Robert
McMahon\My Documents\Macro Program for Reports.xls"
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 620
Default time of day automation

Robert,

Exactly what do you mean by it will not work? The OnTime method looks okay.

If it's not running on startup is the problem, pout the OnTime method in a
macro called Auto_Open, or in the ThisWorkBook Workbook_Open event.

--
HTH

-------

Bob Phillips
... looking out across Poole Harbour to the Purbecks


"Robert McMahon" wrote in message
...
I am trying to write a VBA code to run a certain module
application at a certain time. If someone could point me
in the write direction I can figure the rest out.
Basically I am going to open a certain xls file on
startup and that xls file will contain the VBA
programming to do everything else. This is what I have
but it will not work.

Sub a()
Application.OnTime TimeValue("12:00"), "Test"
End Sub
Sub Test()


Workbooks.Open "C:\Documents and Settings\Robert
McMahon\My Documents\Macro Program for Reports.xls"
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 135
Default time of day automation

Your macro worked for me at 12 noon but not at 12 midnight (I recreated your
folder and file names). You might eliminate one possible source of error by
using a more specific time format like "12:00PM".

HTH,
Larry


"Robert McMahon" wrote in message
...
I am trying to write a VBA code to run a certain module
application at a certain time. If someone could point me
in the write direction I can figure the rest out.
Basically I am going to open a certain xls file on
startup and that xls file will contain the VBA
programming to do everything else. This is what I have
but it will not work.

Sub a()
Application.OnTime TimeValue("12:00"), "Test"
End Sub
Sub Test()


Workbooks.Open "C:\Documents and Settings\Robert
McMahon\My Documents\Macro Program for Reports.xls"
End Sub



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
automation Sherees Excel Discussion (Misc queries) 4 December 11th 09 09:59 PM
Automation Allenc Excel Worksheet Functions 5 January 13th 07 10:42 AM
Automation?? Help in automation Excel Discussion (Misc queries) 1 April 12th 06 02:10 PM
automation Darius New Users to Excel 1 September 23rd 05 07:37 AM
Line Automation Lenora via OfficeKB.com Excel Discussion (Misc queries) 4 August 7th 05 12:08 PM


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