Hello,
I have problem with the attached file when I use Microsoft excel 2013. In fact, with Microsoft Excel 2010 I have no problem at all.
pwd: p@ssw0rd!
The error is the following one:
Run-Time Error '-2147417848 (80010108)': Method error'Insert' of object 'Range'
The macro I use is:
Sub CUTPASTE()
Dim rngSource As Range, rngDestination As Range
Set rngSource = ActiveCell.EntireRow
On Error Resume Next
Set rngDestination = Application.InputBox("The active cell's entire row will be cut. " & vbLf & _
"Select the destination cell to insert the cut row.", _
"Move Row", Type:=8)
On Error GoTo 0
If rngDestination Is Nothing Then Exit Sub 'User canceled
ActiveSheet.Unprotect Password:="p@ssw0rd!"
rngSource.Cut
rngDestination.EntireRow.INSERT Shift:=xlDown
ActiveSheet.Protect Password:="p@ssw0rd!", AllowFormattingCells:=True
End Sub
Can you please help me figuring out why it does work?
I also have problem with the Sub COPYPASTE() macro which doesn't work in Excel 2010. But that would be a plus for me I do not want to mix problem.
PS: CTRL + X = cut macro and CTRL + C = copy macro
Many thanks in advance,
Graig
Bookmarks