largeselection
Active Member
- Joined
- Aug 4, 2008
- Messages
- 358
I have two values that I want to paste into a template after I've pasted the template into a new worksheet. Let me try and explain clearly...
In the macro I have now it opens a specific workbook and copies a template, then pastes it into the new workbook that I am working on.
I would like to make 2 changes in the template (as those values will change since they are date and time). So I would like to put in code in the macro so that it prompts me for the date and time in the beginning and then when it pastes the template in the new sheet it will change the two cells I needed changed to the responses I put into the pop up box. Here's the intro code that I have
'
'
' Keyboard Shortcut: Ctrl+Shift+M
'
Dim MyFile As Workbook
Set MyFile = ActiveWorkbook
Dim wsheet As Worksheet
For Each wsheet In ActiveWorkbook.Worksheets
Dim Response As Long
Response = InputBox("Today's Date...")
Then I have
Worksheets("Sheet1").Cells(2, 21).Value = Response
So what I was trying to do here is have a box pop up and ask me for "today's date" then i would put it in and then it would paste the template in the new sheet and in the cell "U2" (which is 2,21 I think) it would paste my response.
I also need to set this up so that it prompts me for the answer for to similar questions and pastes my response in X2 (2,24) and Z2 (2,26). So total it will prompt me for 3 questions and then paste my responses into U,X, and Z respectively.
Thanks again in advance for all your suggestion and coaching...
In the macro I have now it opens a specific workbook and copies a template, then pastes it into the new workbook that I am working on.
I would like to make 2 changes in the template (as those values will change since they are date and time). So I would like to put in code in the macro so that it prompts me for the date and time in the beginning and then when it pastes the template in the new sheet it will change the two cells I needed changed to the responses I put into the pop up box. Here's the intro code that I have
'
'
' Keyboard Shortcut: Ctrl+Shift+M
'
Dim MyFile As Workbook
Set MyFile = ActiveWorkbook
Dim wsheet As Worksheet
For Each wsheet In ActiveWorkbook.Worksheets
Dim Response As Long
Response = InputBox("Today's Date...")
Then I have
Worksheets("Sheet1").Cells(2, 21).Value = Response
So what I was trying to do here is have a box pop up and ask me for "today's date" then i would put it in and then it would paste the template in the new sheet and in the cell "U2" (which is 2,21 I think) it would paste my response.
I also need to set this up so that it prompts me for the answer for to similar questions and pastes my response in X2 (2,24) and Z2 (2,26). So total it will prompt me for 3 questions and then paste my responses into U,X, and Z respectively.
Thanks again in advance for all your suggestion and coaching...