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.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
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, .....
 
Upvote 0
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
 
Upvote 0
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
 
Upvote 0
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.
 
Upvote 0
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.
 
Upvote 0

Forum statistics

Threads
1,213,549
Messages
6,114,264
Members
448,558
Latest member
aivin

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
Back
Top