drewbsking
New Member
- Joined
- Nov 3, 2011
- Messages
- 34
The following code is the start of what I am trying to do. I want to always copy the entire row A155 and paste it to the active cell row (the cell that is currently selected when the macro is started). The problem however as soon as it selects the row to be copied my active row changes. I would like to accomplish this without any inputboxes. Any suggestion?!
Code:
Sub StdCopy()
Dim SelectedROW As Long
SelectedROW = ActiveCell.Row
Range("A155:A155").EntireRow.Select
Selection.Copy
'Option 1
'===This does not work, it paste right back to the copied row.
ActiveCell.EntireRow.Select
Selection.Paste
'===
'Option 2
'+++This does not work, I dont think I can mix absolute and relative code within the same macro. Plus it simply does not work. It errors out at this line.
cells(SelectedROW,0).EntireRow.Selection
Selection.Paste
End Sub