Thread: [Solved] Need Help Adding to Macros
View Single Post
 
Old 04-15-2016, 10:09 AM
victoriapowers victoriapowers is offline Windows XP Office 2010 32bit
Novice
 
Join Date: Apr 2016
Posts: 1
victoriapowers is on a distinguished road
Exclamation Need Help Adding to Macros

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 added a screenshot of the spreadsheet to this post, notice "workers" on the bottom left.

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 Images
File Type: jpg Screenshot.jpg (238.0 KB, 18 views)

Last edited by Pecoflyer; 04-16-2016 at 07:12 AM. Reason: Added code tags
Reply With Quote