LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Error in Code - Pasting Values

Here is my code - I'm getting an error at the **. I'm trying to paste the
result of my formula as a value.

Also, I don't like the RC cell references. I tried to change them manually
but then the macro doesn't run.

I don't do much visual basic. I record a macro and then TRY to edit it.

Thanks for any help.

ActiveSheet.Unprotect
Range("A24").Select
Selection.Copy
Range("A25").Select
ActiveSheet.Paste
Range("C24:G24").Select
Application.CutCopyMode = False
Selection.Copy
Range("C25").Select
ActiveSheet.Paste
Range("h25").Select
ActiveCell = "0"
Range("i25").Select
ActiveCell = "0"
Range("J24").Select
Application.CutCopyMode = False
Selection.Copy
Range("M22").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("N22").Select
Application.CutCopyMode = False
ActiveCell.FormulaR1C1 = "=rc[-1]*0.2"
Range("N22").Select
Application.CutCopyMode = False
Selection.Copy
Range("J25").Select
**Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
ActiveSheet.Protect
End Sub
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I use SUM when pasting HTML code into new sheet. Crosscatch Excel Worksheet Functions 1 January 9th 06 04:29 PM
running code after pasting data lallen Excel Programming 2 March 27th 05 07:29 PM
Streamline copying and pasting code Art Excel Programming 2 May 22nd 04 09:31 PM
Over-Eager code is pasting 3 times Stuart[_5_] Excel Programming 3 September 10th 03 07:30 PM


All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"