+ Reply to Thread
Results 1 to 3 of 3

Reference all sheets with dates for names by Month

  1. #1
    Registered User
    Join Date
    07-01-2014
    Location
    Kansas, America
    MS-Off Ver
    2010
    Posts
    39

    Reference all sheets with dates for names by Month

    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!

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: Reference all sheets with dates for names by Month

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    07-01-2014
    Location
    Kansas, America
    MS-Off Ver
    2010
    Posts
    39

    Re: Reference all sheets with dates for names by Month

    Kenneth, thanks for the help!
    That works great!
    Last edited by jtmoore; 01-03-2019 at 02:15 PM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Get Month Names Between 2 Dates.
    By naveenmarapaka in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-27-2018, 04:54 AM
  2. [SOLVED] Renaming Sheets with present month, all dates of that particular month
    By laansesu in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-04-2015, 08:43 AM
  3. List Month names between 2 dates
    By Sasquatch2014 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2015, 02:47 PM
  4. From A Table Of Names And Birth Dates Pull A List Of Names As Of A Reference Date And Ther
    By rahuleyes in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 17
    Last Post: 11-27-2014, 03:44 PM
  5. Using LOOKUP to assign month names to cells with dates.
    By AndyPandy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-12-2013, 06:06 AM
  6. how can I change the default month names for dates grouping in pivot tables
    By bagullo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-25-2011, 05:24 AM
  7. Sql query(convert dates to month names)
    By poppy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-20-2005, 04:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1