briandeasycorkcityie
New Member
- Joined
- Dec 21, 2023
- Messages
- 3
- Office Version
- 365
- Platform
- Windows
Hi,
I want to copy a fixed range of cells to the location of the active cell with the cell and row properties. I have that part working as below but I want to by able to insert it into the middle of a sheet and push down the rows below so that they don't get overwritten. Can anyone help with this please?
I want to copy a fixed range of cells to the location of the active cell with the cell and row properties. I have that part working as below but I want to by able to insert it into the middle of a sheet and push down the rows below so that they don't get overwritten. Can anyone help with this please?
VBA Code:
Sub POInsert()
Dim btn As OLEObject, x As Long, y As Long, i As Long
Application.ScreenUpdating = False
y = ActiveCell.Row
Range("A1:M6").Copy Destination:=Cells(y, 1)
For i = 0 To 6
Rows(y + i).RowHeight = Rows(1 + i).RowHeight
Next i
Application.ScreenUpdating = True
End Sub