Hi There,
I have set up some scripting within excel to automate some report production, getting data from a call solution called CMS. It works great so long as the data I require is from yesterday. It kinda falls down when I need data from 3 or 4 days ago. I have around 15 scripts set up (each getting a specific piece of data) that all contain the following entry to specify the date its requesting data for:
Rep.SetProperty "Date","-1"
where -1 indicates the previous day.
I also run the following code to run through each of the scripts sequentially (means I only have one click or task to schedule rather than dozens).
Option Explicit
Call ExecuteDirectory("DRIVE:\FOLDER 1\FOLDER 2\DESTINATION FOLDER")
Function ExecuteDirectory(strPath2Folder)
Dim fso, f, fc, f1, strFiles, intFiles
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
strFiles = ""
Set fso = CreateObject("Scripting.FileSystemObject")
If (fso.FolderExists(strPath2Folder)) Then
Set f = fso.GetFolder(strPath2Folder)
Set fc = f.Files
For Each f1 in fc
Dim fileToRun
fileToRun = strPath2Folder & "\" & f1.Name
WshShell.Run Chr(34) & fileToRun & Chr(34), 1, true
Next
Set f1 = Nothing
Set fc = Nothing
Set f = Nothing
End If
End Function
What I would like would be a "pop-up" box open that will allow me to enter a value that replaces the "-1" in each of the scripts it then opens and runs. I could enter -3 or a specific date in the fomant "DD/MM/YYYY".
Is this possible?
your help is greatly appreciated.
Bookmarks