Results 1 to 13 of 13

editing a value within another excel (or non-excel) script.

Threaded View

  1. #1
    Forum Contributor
    Join Date
    09-05-2011
    Location
    Essex, England
    MS-Off Ver
    Excel 2003 Excel 2007
    Posts
    383

    editing a value within another excel (or non-excel) script.

    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.
    Last edited by Kramxel; 07-04-2013 at 11:05 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1