i have the following code that works fine if the path is hard coded, but when i just a variable i get an error.
Dim objExcel As Object
Dim objWorkbook As Object
sDate = Right("00" & Year(Now()), 4) & Right("0" & Month(Now()), 2) & Right("00" & Day(Now()), 2)
objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
--variable
objWorkbook = objExcel.Workbooks.Open(Str(Dts.Variables("User::LTH_IP").Value) & sDate & ".xls", , , , " test")
--hard coded.
'objWorkbook = objExcel.Workbooks.Open("C:\Development\Dashboard Feeds\adm" & sDate & ".xls", , , , "test")
objExcel.DisplayAlerts = False
objWorkbook.Password = ""
objWorkbook.SaveAs("C:\Development\Dashboard Feeds\adm" & sDate & ".xls")
objExcel.Quit()
variable LTH_IP "datatype string" "value C:\Development\Dashboard Feeds\adm"
In the stm:- User::LTH_IP
so i am trying to add "& sDate" which will give me th efile name admyyymmdd.xls