VBA
New Member
- Joined
- Jan 19, 2009
- Messages
- 39
Heya,
I'm trying to incoperate "paste special" in my VBA-code and used "macro recorder" to figure out how to do so. However, when I try to run the so developed code it gives an error I have no clue why
CODE:
Sub Ooops()
Sheets("JD").Visible = False
Sheets("Jn").Delete
Sheets("JD").Range("A1:Z480").Copy
Sheets.Add.Name = "Jn"
Sheets("Jn").Range("A10").Select
ActiveSheet.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End Sub
Anybody who can tell me what I'm doing wrong? I can't use "paste" as then I'll get the wrong values...
Thanks in advance
I'm trying to incoperate "paste special" in my VBA-code and used "macro recorder" to figure out how to do so. However, when I try to run the so developed code it gives an error I have no clue why
CODE:
Sub Ooops()
Sheets("JD").Visible = False
Sheets("Jn").Delete
Sheets("JD").Range("A1:Z480").Copy
Sheets.Add.Name = "Jn"
Sheets("Jn").Range("A10").Select
ActiveSheet.PasteSpecial Paste:=xlPasteValues, _
Operation:=xlNone, _
SkipBlanks:=False, _
Transpose:=False
End Sub
Anybody who can tell me what I'm doing wrong? I can't use "paste" as then I'll get the wrong values...
Thanks in advance