Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Application.Ontime question

  Asked By: Maria    Date: Jan 03    Category: MS Office    Views: 1033
  

I know that Application.Ontime is a way to schedule a task. But the
sub which contains the Application..... must be executed in the
first place, right?

Is there any way or schedule a task, such that, at 7:30am a certain
workbook will automatically be opened and things getting done as if
someone is controlling the computer? If that can come into reality,
it will be really sweet cause my life can be changed forever -- no
need to get up at 7:00 then.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Ned Storm     Answered On: Jan 03

Yes, but the catch is you need an instance of Excel which contains the
Ontime code running in the background for this to happen. At the
appointed hour, this can then open a workbook and do stuff.

Although I haven't tried this, could you use the windows Task Scheduler
instead? Just thinking aloud, if you used this to open Excel at - say -
7.25, then set up an Excel add-in or personal macro workbook with
Auto_Open code for your Ontime, then you might be able to do away with
Excel running in the background. You could also give your code the
weekend off if you went this way.

 
Answer #2    Answered By: Catherine Campbell     Answered On: Jan 03

I thought I had answered this somewhere but I can't find it!
Use Scheduled Tasks (see windows help) in control panel
(win2kpro),when it asks for the programme to run, choose the xls file
instead, by browsing to it.

Now make sure a
Private Sub Workbook_Open()
procedure in the ThisWorkbook code of that xls file has the necessary
code, or calls to the code that you want executing, and that
ultimately somewhere, if you want, the code to close and/or save the
workbook.

 
Didn't find what you were looking for? Find more on Application.Ontime question Or get search suggestion and latest updates.




Tagged: