I used your code to read the file as a template, but then I can only read one file as a template, for example, I have the file name โWeekly report 21โ as a template, where 21 is the week number, what if you want to read that the same pattern with a different week number as a suffix, without manually changing the number as a suffix?
Secondly, if this is not what we can do, how can I read the current active book as a template?
Dim strTemplate As String: strTemplate = "c: \ temp \ myfile.xlsm" Dim wb As Set Workbook Set wb = Workbooks.Add (strTemplate)
source share