Results 1 to 11 of 11

how to paste special only value in this code?

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-12-2010
    Location
    india
    MS-Off Ver
    Excel 2007
    Posts
    134

    how to paste special only value in this code?

    hi,
    i have this code it work but now i need only value to b paste in new sheet how can i do pl help i try that comment part but it give me error 1004 Application-define or object define error

         
    
               Set rBFind = ws.Range("A:A").FindNext(rTFind)
                    sname = Format(Day(Int(rTFind.Offset(-1))) + 1, "DD")
                    If Not Evaluate("=ISREF('" & sname & "'!A1)") Then    'create sheet if needed
                        Worksheets.Add(After:=Worksheets(Worksheets.Count)).Name = sname
                    Else                                                      'clear sheet if it exists
                        Sheets(sname).Move After:=Sheets(Sheets.Count)
                        Sheets(sname).Cells.Clear
                    End If
                    ws.Rows(rTitle).Copy Sheets(sname).Cells(rTitle, "A")
                    If rBFind.Address <> rFirst.Address Then
                    ws.Range(rTFind.Offset(-1), rBFind.Offset(-2)).EntireRow.Copy _
                    Sheets(sname).Cells(rTitle + 1, "A")
                    'ws.Range(rTFind.Offset(-1), rBFind.Offset(-2)).EntireRow.Copy
                    'Sheets(sname).Range(Cells(rTitle + 1, "A")).Paste 'Special.x1Value
                    
                    Else
                        ws.Range(rTFind.Offset(-1), ws.Cells(LR, "A")).EntireRow.Copy _
                                Sheets(sname).Cells(rTitle + 1, "A") '.PasteSpecial.x1Value
                                
                    End If
    in this segment i get error
    
                    'ws.Range(rTFind.Offset(-1), rBFind.Offset(-2)).EntireRow.Copy _
                    Sheets(sname).Cells(rTitle + 1, "A")
          ''' i change this to next one   
    
    
                    ws.Range(rTFind.Offset(-1), rBFind.Offset(-2)).EntireRow.Copy
                    Sheets(sname).Range(Cells(rTitle + 1, "A")).Paste 'Special.x1Value
    thanks for any help.
    Last edited by jay11; 06-29-2015 at 08:19 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Paste Special (Value) for my Code
    By Jeckford in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2015, 08:02 AM
  2. how to add paste special value in this code?
    By heihoiwin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-22-2013, 07:23 PM
  3. VBA code for paste Special value
    By Kamal Asharaf in forum Excel General
    Replies: 1
    Last Post: 06-14-2012, 07:12 AM
  4. Paste Special in VBA code
    By freekrill in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-01-2009, 03:58 AM
  5. need paste special value code
    By rslotpole in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-20-2006, 02:27 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