+ Reply to Thread
Results 1 to 3 of 3

VBA to create worksheets from a list - but the list is dates

Hybrid View

Hondahawkrider VBA to create worksheets from... 02-09-2022, 10:05 PM
jindon Re: VBA to create worksheets... 02-10-2022, 12:33 AM
Hondahawkrider Re: VBA to create worksheets... 02-10-2022, 11:15 AM
  1. #1
    Registered User
    Join Date
    07-07-2015
    Location
    Wash DC
    MS-Off Ver
    10
    Posts
    57

    VBA to create worksheets from a list - but the list is dates

    I have created, and um borrowed from the internet multiple vba macro scripts to create worksheets (new tabs) from a template/master sheet ... The most recent being the script below that also makes a link to the tab

    The script works great if I am using names.... However I would like to do the same but using date fields. As I understand it, there is an issue using the "/" in the names ... I would ok with just about any format say "." ie 02.09.2022 or a "-" ie 02-09-2022 - doesn't matter ....

    Is there a way to create worksheet tabs with dates as the name ?

    Thanks in Advance


    Sub CreateDateWorksheets()
    Dim c As Range

    Application.ScreenUpdating = False
    For Each c In Sheets("Admin").Range("A1:A10")
    Sheets("Template").Copy after:=Sheets(Sheets.Count)
    With c
    ActiveSheet.Name = .Value
    .Parent.Hyperlinks.Add Anchor:=c, Address:="", SubAddress:= _
    "'" & .Text & "'!A1", TextToDisplay:=.Text
    End With
    Next c
    Application.ScreenUpdating = True
    End Sub
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,835

    Re: VBA to create worksheets from a list - but the list is dates

    If dates in colA are formatted as such, try change .Value to .Text
    ActiveSheet.Name = .Text

  3. #3
    Registered User
    Join Date
    07-07-2015
    Location
    Wash DC
    MS-Off Ver
    10
    Posts
    57

    Re: VBA to create worksheets from a list - but the list is dates

    didn't even think of that...worked great .. thanks

+ 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. [SOLVED] Create list of dates
    By Programmernovice in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 01-18-2022, 06:42 PM
  2. [SOLVED] Excel macro to autofill a list and create new worksheets with names from the list
    By fms006 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-24-2020, 05:38 PM
  3. [SOLVED] Want to create list of custom dates (ex: M, W, F, Sat only). HELP!
    By reinvintage in forum Excel General
    Replies: 6
    Last Post: 11-15-2013, 03:31 PM
  4. Create new worksheets with names from a list
    By daniel_t in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2013, 03:21 AM
  5. Replies: 2
    Last Post: 05-06-2013, 08:53 AM
  6. Replies: 3
    Last Post: 06-24-2012, 02:01 AM
  7. Create list of worksheets
    By caoimhincryan in forum Excel General
    Replies: 0
    Last Post: 07-28-2005, 04:56 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