Results 1 to 4 of 4

Thread: Need Help Adding to Macros

  1. #1

    Need Help Adding to Macros



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hello,
    I'm looking to edit a macros code and I'm having some issues. Right now our workbook includes a growing amount of days on a project (day 1, day 2, day 3, etc.).
    We have the same employees working each day on the same project. I'm looking to add code to our current macros which would populate the names of the employees from the day before on each added sheet. I've included a screenshot of the spreadsheet, notice worker on the bottom left corner.

    I've included the existing code below.

    Code:
    Sub CreateNewDay()
    '
    ' CreateNewDay Macro
    ' Creates new tab for daily work log
    '
    ' Keyboard Shortcut: Ctrl+Shift+D
    Dim InputValue As Variant
    Dim NewName As String
    Dim NewName1 As String
    
    
    Sheets("Blank to Copy").Visible = True
    Sheets("Blank to Copy").Select
    ActiveWindow.SmallScroll Down:=-12
    Sheets("Blank to Copy").Select
    Sheets("Blank to Copy").Copy Before:=Sheets("Blank to Copy")
    Sheets("Blank to Copy (2)").Select
    Sheets("Blank to Copy (2)").Name = "Day (number)"
    
    InputValue = InputBox("Please enter the date (mm/dd/yy):")
    Range("B3") = InputValue
    
    
    
    NewName = InputBox("Enter day number on job (i.e. 1,2,3..100):")
    NewName1 = "Day " & NewName
    ActiveSheet.Name = NewName1
    
    
    Sheets("Blank to Copy").Visible = False
    
    
    End Sub
    
    
    Any information would be greatly appreciated. Thank you in advance for your time.
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	Screenshot.jpg 
Views:	13 
Size:	97.4 KB 
ID:	4824  
    Last edited by Pecoflyer; 2016-04-16 at 09:12 AM. Reason: Added code tags

  2. #2
    Admin Alumnus Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,747
    Articles
    0
    Excel Version
    2010 on Xubuntu
    Last edited by Pecoflyer; 2016-04-16 at 04:18 PM.

  3. #3
    Acolyte vcoolio's Avatar
    Join Date
    Jan 2016
    Posts
    29
    Articles
    0
    Excel Version
    2016
    Hello Pecoflyer,

    I'm disappointed also:-

    http://ccm.net/forum/affich-890314-add-to-excel-macros

    Cheerio,
    vcoolio.

  4. #4
    Admin Alumnus Pecoflyer's Avatar
    Join Date
    Oct 2011
    Location
    Brussels Belgium
    Posts
    1,747
    Articles
    0
    Excel Version
    2010 on Xubuntu
    Heavy cross-poster - Thread closed

Tags for this Thread

Posting Permissions

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