Hello All,
My brain is failing me, I know this must be easy, but I'm at a loss.
I have a workbook that tracks department projects and activities. The workbook has macros which make a protected copy of the master activity list sheet each Friday to record the state of things. The new sheet is named whatever the current date is that day and is formatted MM-DD-YYYY. This all works well.
However, My workbook is starting to bog down due to size and I want to have some code which will select all the sheets from a given month and move them to a new workbook. I know I could have the code which makes a new sheet just send it to a new workbook at that time, but there are reasons to leave at least the current month's worth of records in the main workbook.
I want the user to be able to activate the macro and then input a given month (01, 02, etc.) and have all worksheets with that month as part of the name be moved to the new workbook.
Example: Worksheets named 12-31-2019, 01-03-2019, and 01-10-2019. When the macro starts the user would input 01 and all worksheets with 01 in the month location would be moved.
To be clear, I know how to accomplish the move- Sheets(Sheetname).Move Before:=Workbooks("ActivityListArchive.xlsx"). I just don't know how to reference the desired sheets and input that reference into the code. Thanks in advance for your assistance!
Bookmarks