Need Help Adding to Macros

victoriapowers

New Member
Joined
Apr 15, 2016
Messages
8
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.
Any information would be greatly appreciated. Thank you in advance for your time.
 

Some videos you may like

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.

JoeMo

MrExcel MVP
Joined
May 26, 2009
Messages
17,389
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
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.
Any information would be greatly appreciated. Thank you in advance for your time.
You will need to provide information such as the layout of your sheet or sheets in your workbook, where you want the names to populate, the existing code you want to add to, .....
 

victoriapowers

New Member
Joined
Apr 15, 2016
Messages
8
You will need to provide information such as the layout of your sheet or sheets in your workbook, where you want the names to populate, the existing code you want to add to, .....

Thank you for your reply, Joe. I've included the existing code below.

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




I've added a picture of the speadsheet, you'll notice where it says "workers" toward the bottom left.
Spread sheet example is here:
9
 

victoriapowers

New Member
Joined
Apr 15, 2016
Messages
8
2ez5v9f.jpg
[/IMG]
Thank you for your reply, Joe. I've included the existing code below.

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




I've added a picture of the speadsheet, you'll notice where it says "workers" toward the bottom left.
Spread sheet example is here:
9
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,971
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

I have removed your other thread. All clarifications, directly-related follow-ups, and bumps should be posted back to the original thread. Per forum rules, posts of a duplicate nature will be locked or deleted (rule #12 here: Forum Rules).

You cannot attach files on this forum. There are instructions on how you can post images found in the "Posting Aids" section of this link here: http://www.mrexcel.com/forum/board-announcements/127080-guidelines-forum-use.html. There is also a "Test Here" forum on this site that you can use to test those tools before using them in your threads.
 

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,971
Office Version
  1. 365
Platform
  1. Windows
While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links to the other thread (see rule #13 here: http://www.mrexcel.com/forum/board-announcements/99490-forum-rules.html). This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,177
Messages
5,600,160
Members
414,367
Latest member
dw970906

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top