#1
|
|||
|
|||
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 Last edited by Pecoflyer; 04-16-2016 at 07:12 AM. Reason: Added code tags |
#2
|
||||
|
||||
Cross post without links http://www.excelguru.ca/forums/showt...3717#post23717
http://www.mrexcel.com/forum/excel-q...ng-macros.html
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post |
Tags |
add macros, macros |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to automatically enable the macros upon opening a file with macros? | laurieli | Office | 7 | 01-17-2016 08:56 AM |
Adding Image into a excel cell and adding a hyperlink to the image | saravananiyyanar | Excel | 3 | 05-04-2011 08:31 AM |
Macros | Steveg | Word VBA | 0 | 08-18-2010 04:04 PM |
Macros | Desertwrangler | Word VBA | 6 | 06-25-2010 07:06 AM |
Macros | krdzal | Excel | 1 | 04-06-2010 07:43 AM |