Results 1 to 2 of 2

Thread: Save to new worksheet and rename sheet to tomorrows/next working days date as ddmmyyyy
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    New Member
    Join Date
    Sep 2019
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Save to new worksheet and rename sheet to tomorrows/next working days date as ddmmyyyy

    From what I have now as below, I need to take the data generated, save to a new sheet and then rename that sheet to tomorrows or the next working days date (taking into account weekends/public holidays).

    Is this actually achievable, or at best to excude weekends.

    In additon can I alo insert the same date as a header in the sheet.

    Below is what I have, which will do s rquired but only to todays date.

    Code:
    Intersect(ActiveSheet.UsedRange, Range("A:J")).Copy
            
            Dim szTodayDate As String
            szTodayDate = Format(Date, "ddmmyyyy")
            On Error GoTo MakeSheet
            Sheets(szTodayDate).Activate
            Exit Sub
    MakeSheet:
            Sheets.Add , Worksheets(Worksheets.Count)
            ActiveSheet.Name = szTodayDate
    
            Sheets("szTodayDate").Range("A1").PasteSpecial Paste:=xlPasteValues
            Sheets("working").Application.CutCopyMode = False

  2. #2
    Board Regular
    Join Date
    Sep 2016
    Posts
    2,574
    Post Thanks / Like
    Mentioned
    36 Post(s)
    Tagged
    1 Thread(s)

    Default Re: Save to new worksheet and rename sheet to tomorrows/next working days date as ddmmyyyy


Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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