Steve,
My intention is to create an .exe file that I can assign to to the Windows
Task Scheduler but I think I'll have to give up on it as network security
will probably log me off after 10 minutes or so - the script I've written is
below.
However, if I could access the scripting runtimes from within VBA as you
say, how would I create an .exe file to assign this script to run through
Task Scheduler?
Many thanks,
Tony
Application.ScreenUpdating = False
Sheets("NEWTSordercopy").Select
Windows("NEWTS online pro forma example.xls").Activate
Application.Goto Reference:="R1C1"
Range("A1
30").Select
Selection.Copy
Windows("Vantage Interactive Advanced tm.xls").Activate
Application.Goto Reference:="R1C1"
ActiveSheet.Paste
Sheets("NEWTSordercopy").Select
Range("B11").Select
Selection.NumberFormat = "m/d/yyyy"
Selection.Copy
Range("B12").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
'add in training and gb dates
'input trng dates
Application.Run "'Vantage Interactive Advanced tm.xls'!inputmidnewttrng"
'input gb dates
Sheets("NEWTSordercopy").Select
Range("B11").Select
Selection.Copy
Sheets("Datainput").Select
Range("L5").Select
ActiveSheet.Paste
Application.CutCopyMode = False
Selection.AutoFill Destination:=Range("L5:L17"), Type:=xlFillDefault
Range("L5:L17").Select
Range("L5:L9").Select
Selection.Copy
Range("S2").Select
ActiveSheet.Paste
Range("L12:L16").Select
Application.CutCopyMode = False
Selection.Copy
Range("S7").Select
ActiveSheet.Paste
Range("L1:L17").Select
Application.CutCopyMode = False
Selection.ClearContents
Range("M8").Select
Selection.Copy
Range("L1:L18").Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
Range("M23").Select
'adjust
Range("S3").Select
ActiveCell.FormulaR1C1 = "=R[-1]C+1"
Range("S3").Select
Selection.AutoFill Destination:=Range("S3:S6"), Type:=xlFillDefault
Range("S3:S6").Select
Range("S7").Select
ActiveCell.FormulaR1C1 = "=R[-1]C+3"
Range("S7").Select
Selection.AutoFill Destination:=Range("S7:S11"), Type:=xlFillDefault
Range("S7:S11").Select
Range("S8").Select
ActiveCell.FormulaR1C1 = "=R[-1]C+1"
Range("S8").Select
Selection.AutoFill Destination:=Range("S8:S11"), Type:=xlFillDefault
Range("S8:S11").Select
'paste first Sat working date to U1 on Datainput:
Application.ScreenUpdating = False
Sheets("Datainput").Select
Range("U2").Select
Selection.Copy
Range("U1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
'SCORE and input SMI to newtsrderform BY EVALUATING NEWTSFORM SCORES:
Sheets("NEWTSform").Select
Select Case Range("H19").Value
Case 4
Call inputBBSMIDtonewtsorder
End Select
Select Case Range("H19").Value
Case 3
Call inputBBSMIEtonewtsorder
End Select
'etc. ...
' ...
'check scoring of GB start time and cycle hours and input to Grad Bay:
Application.Run "'Vantage Interactive Advanced
tm.xls'!Calloptionscore25or36GBintervals"
Application.Run "'Vantage Interactive Advanced tm.xls'!cyclehrsscoreandrun"
'now return to NEWTSsteps
DoEvents
Application.Run "'Vantage Interactive Advanced
tm.xls'!SCOREANDRUNSTAFFGROUPANDMN"
Application.Run "'Vantage Interactive Advanced tm.xls'!backtoNEWTSsteps"