Results 1 to 14 of 14

Using code to paste values

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    11-27-2013
    Location
    Brooklyn, NY
    MS-Off Ver
    Office 365
    Posts
    1,172

    Using code to paste values

    Hi.
    When the code tries pasting something i get this error message: "paste special method of range class failed".

    Here's my code, see the red font....
    Sub MATCH()
    
    Dim B As String
    Dim lr As Long
    Dim rCell As Long
    
    B = ActiveCell.Offset(0, -1).Value
    lr = Range("D" & Rows.Count).End(xlUp).Row
    For rCell = 2 To lr
        If Range("D" & rCell).Value = B Then
        Range("E" & rCell).Value = "INVOICE"
         Range("K" & rCell).Value = "INV"
         Range("F" & rCell).PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False
    
        End If
        
        Next rCell
        
    End Sub
    Last edited by kosherboy; 06-12-2014 at 09:58 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Code to paste values not formulas
    By excellearner121 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-22-2014, 06:33 AM
  2. Help with a VBA code to paste only values from a Web Query
    By adtamez in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-06-2014, 02:16 PM
  3. [SOLVED] Changing Current Code from Paste Formulas to Paste Values
    By freybe06 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2013, 12:33 PM
  4. Copy and paste code pasting won't paste just values
    By thehotbreadguy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-09-2013, 11:12 PM
  5. Changing code to paste as values
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-25-2010, 09:18 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1