I'm working on scheduling an Excel macro to run on a daily basis. This article was my starting point. https://www.thespreadsheetguru.com/blog/how-to-automatically-run-excel-vba-macros-daily
I've worked out most of the issues, but now I need to work on the file that is opened. It will have a timestamp so I need to use a wildcard in this line:
ExcelFilePath = "C:\Users\chris\Documents\My File.xlsm"
Which is later called here:
Set wb = ExcelApp.Workbooks.Open(ExcelFilePath)
I've tried multiple options to include the * but none are working. From the searching I've done, I'm not sure if using it with the Workbooks.Open
will work. But, a lot of what I'm finding is VBA related and this is a VBS file so I'm not sure if I'm looking at the right thing or not.
Any ideas? I basically just need to find a file with "*UserAttendance.csv" and then call that file in the .vbs file.