Hi,
I am trying to copy a value from one cell to another cell in another worksheet and get this error.
application-defined or object-defined error
Here is my code: (basically I create a macro and made a few changes to it)
Sub CopyAndPaste() 'copy and paste service code number
Sheets("data").Select
Range("A1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
Sheets("CopyPaste").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(3, 0).Select
Do
Sheets("Data").Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
Sheets("CopyPaste").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(3, 0).Select
Application.CutCopyMode = False
Sheets("data").Select
Loop Until IsEmpty(ActiveCell)
End Sub
Any help would be appreciated.
Thanks!
I am trying to copy a value from one cell to another cell in another worksheet and get this error.
application-defined or object-defined error
Here is my code: (basically I create a macro and made a few changes to it)
Sub CopyAndPaste() 'copy and paste service code number
Sheets("data").Select
Range("A1").Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
Sheets("CopyPaste").Select
Range("C4").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(3, 0).Select
Do
Sheets("Data").Select
Selection.Copy
ActiveCell.Offset(1, 0).Select
Sheets("CopyPaste").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ActiveCell.Offset(3, 0).Select
Application.CutCopyMode = False
Sheets("data").Select
Loop Until IsEmpty(ActiveCell)
End Sub
Any help would be appreciated.
Thanks!