Thanks in advance for your suggestions.
I have an excel file named "1st 05-01-13 MB.xlsx"
The date will vary each month: could be "1st 06-03-13 MB.xlsx" next month for example. The file name syntax is the same everymonth except the date change.
I would like to extract the string "05-01-13" ( in this case) and load it as the value for the variable "currentmonth" in my macro that builds a report.
is there a way to do this when initializing the variable without having to maually type it in each month after viewing the current month's file?
Here is the code line where i would want to insert the variable "currentmonth"
Thanks, these forums have been a great help as I learn the vba coding.![]()
Sheets("NOGC").Copy After:=Workbooks("1st " & currentmonth & " MB.xlsx").
Bookmarks