Hello,
I am using a macro to update an active sheet, with information from another worksheet. The second worksheet has a dynamic name, with a prefix that will always be consistent (let's call it "Source"), and 8 characters that will always equal the last 8 characters of my active worksheet. I need some help with a macro that will find the new worksheet for me, each month.
My active worksheet is named ("Destination XXYYZZZZ.xlsm") where XXYYZZZZ will be renamed as a date each month.
My source worksheet will be named ("Source XXYYZZZZ.xlsx") where XXYYZZZZ will always be the same date as the Destination worksheet.
"Source XXYYZZZZ.xlsx" will exist in a subfolder of the directory I would like to find it in, as I have separate folders for each year, and would like the macro to continue to be active when I switch years. As an example:
For 2013, the director was \Source\2013\Source XXYYYZZZZ.xlsx
For 2014, the director was \Source\2013\Source XXYYYZZZZ.xlsx
Once I have a macro that identifies the correct Source workbook, I will name it and then use it to copy and paste information from (which I know how to do).
Any thoughts?
I am using a macro to update an active sheet, with information from another worksheet. The second worksheet has a dynamic name, with a prefix that will always be consistent (let's call it "Source"), and 8 characters that will always equal the last 8 characters of my active worksheet. I need some help with a macro that will find the new worksheet for me, each month.
My active worksheet is named ("Destination XXYYZZZZ.xlsm") where XXYYZZZZ will be renamed as a date each month.
My source worksheet will be named ("Source XXYYZZZZ.xlsx") where XXYYZZZZ will always be the same date as the Destination worksheet.
"Source XXYYZZZZ.xlsx" will exist in a subfolder of the directory I would like to find it in, as I have separate folders for each year, and would like the macro to continue to be active when I switch years. As an example:
For 2013, the director was \Source\2013\Source XXYYYZZZZ.xlsx
For 2014, the director was \Source\2013\Source XXYYYZZZZ.xlsx
Once I have a macro that identifies the correct Source workbook, I will name it and then use it to copy and paste information from (which I know how to do).
Any thoughts?
Last edited: