Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Adelisa Fischer   on Jan 27 In MS Office Category.

  
Question Answered By: Jordan Watson   on Jan 27

We have several Excel VBA applications that run over night
automatically. You need 3 things to make this happen. First, you have
to include a subroutine in "This Workbook," similar to the code shown below:

Private Sub Workbook_Open()

Application.Wait (Now + TimeValue("0:00:05"))

ClearOld

StageForecasts

AHAPSMailSub

Application.Wait (Now + TimeValue("0:0:30"))

ThisWorkbook.Save
Application.Quit


End Sub

This code calls 3 other subroutines plus saves and quits the
application. There are also some pauses to allow editing.

Second, the application has to be digitally signed, so it can run upon
opening without any input.

Third, schedule the application to run using the Scheduled Tasks utility
in Windows.

We've been running these for a few months and it works pretty well.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

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


Tagged: