debauch
08-15-2007, 09:58 AM
Hello,
I am trying to run a VB script. Currently, there is a hardcoded date in there, that pulls data ( -1 which represents yesterday). I want to have a file, where the file will have say -3 in it, without having to change the hardcoded date anymore.
dayPath = "I:\TimeRun\Extract\Data\Scripts\Days.xls" _
& Sheets("RunDate").Range("a2")
dayPath used to just be "-1" , but I want to be able to update the days file to what ever date I want, and then run the script. The vba I wrote to try and do that though is not working. Is it even possible to pull a cell's contents if the file is closed? Most of these scripts run when people are not in the office.
I am trying to run a VB script. Currently, there is a hardcoded date in there, that pulls data ( -1 which represents yesterday). I want to have a file, where the file will have say -3 in it, without having to change the hardcoded date anymore.
dayPath = "I:\TimeRun\Extract\Data\Scripts\Days.xls" _
& Sheets("RunDate").Range("a2")
dayPath used to just be "-1" , but I want to be able to update the days file to what ever date I want, and then run the script. The vba I wrote to try and do that though is not working. Is it even possible to pull a cell's contents if the file is closed? Most of these scripts run when people are not in the office.