Your file path looks fine. Wonder why you are getting that error…
Can i know the data types of those two variables valstart and valend?
Your file path looks fine. Wonder why you are getting that error…
Can i know the data types of those two variables valstart and valend?
HI @jiejie
I see. I thought it was a datatime variable. That’s why I asked you to convert the format. If its string, try the below command.
valstart.Replace("/","-").Trim + valend.Replace("/","-").Trim
“c:\Timesheet\”+ valstart.Replace("/","-").Trim + valend.Replace("/","-").Trim +".xlsm"
This will work for you
Let know how it goes
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.