Results 1 to 3 of 3

Creating a new sheet with date in the sheet name

Threaded View

  1. #1
    Registered User
    Join Date
    07-23-2013
    Location
    Finland
    MS-Off Ver
    Excel 2013
    Posts
    10

    Creating a new sheet with date in the sheet name

    Sub NewCalendar()
    ' Make new calendar
    
    On Error GoTo ProcError
    
        Dim ShtName$
        
        Sheets(2).Copy After:=Sheets(1)
    
        ShtName = Range("H1").Value + 1
        
        Sheets(2).Name = ShtName
        
        Range("H1").Value = ShtName
        
        
    ProcError:
        
        Exit Sub
        
        
    End Sub
    This works just fine when I create first copy, but after that it's type mismatch (error 13)

    EDIT: As this is my first post here, I forgot to explain what I want to do here.
    I want to create a new sheet with a name "24.7.2013" if the previous date was "23.7.2013" and so on.
    Every H11 Cell in every sheet contains a date. I am setting the variable ShtName a value (the date from newest sheet cell H11 + 1).
    Then I copy the newest sheet and rename it with ShtName. Sorry if this seems messy. It's actually quite simple, I'm just not so good at explaining stuff.
    Last edited by hermoraunio; 07-23-2013 at 07:19 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] creating excel sheet based on today's date
    By tanglin10 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-22-2013, 07:38 AM
  2. Replies: 2
    Last Post: 12-05-2012, 07:57 PM
  3. Creating a summary sheet based on date and printing it
    By bchico in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2012, 11:50 AM
  4. Replies: 6
    Last Post: 07-25-2012, 07:55 AM
  5. Creating a control button on a front sheet to update another sheet
    By 2steve40 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2010, 06:47 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