I need to access a file made monthly that gets spit out in a weird date format. The files are named source1901.xls (19 for year 01 for month), source1902.xls (02 for February etc).
I don't have problems with files that are formatted properly as I just use the "MMMM YYYY" designation for those but I can't seem to figure out how to get it to translate the year and month into two digits (19 for 2019 and 01 for January for example. So 1901).
Thanks for the help!
Code:
Workbooks.Open Filename:="L:\sales\output\source" & Format(DateAdd("m", -1, Date), "YYMM") & ".xls", UpdateLinks:=False
I don't have problems with files that are formatted properly as I just use the "MMMM YYYY" designation for those but I can't seem to figure out how to get it to translate the year and month into two digits (19 for 2019 and 01 for January for example. So 1901).
Thanks for the help!