Michael Yau
New Member
- Joined
- Dec 9, 2014
- Messages
- 1
Hi,
I've been browsing on this site to look for solution but still no help. I am looking for a code that will copy a cell from an existing workbook and paste to a temporary workbook.
I ran a macro and it created a temporary workbook. I ensured that the temporary workbook is still selected when the codes below are entered.
I am not "dim-ming" the saved workbook as I can simply type the code since it has a name (automation). I want to copy the E7 Cell from the saved workbook called Automation and paste it on E1 Cell on the unsaved workbook. After having pasted the copied data on cell E1, I want to change the cell format to Short Date.
Dim wbunsaved As Workbook</SPAN>
Set wbunsaved = ThisWorkbook <<<THE SPAN code< this inputing when selected is workbook unsaved>
Workbooks("Automation.Xlsm").Sheets("automation").Range("E7").Select</SPAN>
Selection.Copy</SPAN>
Workbooks("thisworkbook").Sheets("summary").Range("E1").Select</SPAN>
Selection.Paste</SPAN>
Selection.NumberFormat = "m/d/yyyy"
Thanks for your help in advance.</SPAN>
I've been browsing on this site to look for solution but still no help. I am looking for a code that will copy a cell from an existing workbook and paste to a temporary workbook.
I ran a macro and it created a temporary workbook. I ensured that the temporary workbook is still selected when the codes below are entered.
I am not "dim-ming" the saved workbook as I can simply type the code since it has a name (automation). I want to copy the E7 Cell from the saved workbook called Automation and paste it on E1 Cell on the unsaved workbook. After having pasted the copied data on cell E1, I want to change the cell format to Short Date.
Dim wbunsaved As Workbook</SPAN>
Set wbunsaved = ThisWorkbook <<<THE SPAN code< this inputing when selected is workbook unsaved>
Workbooks("Automation.Xlsm").Sheets("automation").Range("E7").Select</SPAN>
Selection.Copy</SPAN>
Workbooks("thisworkbook").Sheets("summary").Range("E1").Select</SPAN>
Selection.Paste</SPAN>
Selection.NumberFormat = "m/d/yyyy"
Thanks for your help in advance.</SPAN>