Results 1 to 3 of 3

Auto copy and paste value

Threaded View

processchip Auto copy and paste value 02-17-2011, 11:39 AM
stnkynts Re: Auto copy and paste value 02-17-2011, 11:51 AM
processchip Re: Auto copy and paste value 02-17-2011, 11:56 AM
  1. #1
    Registered User
    Join Date
    01-17-2011
    Location
    Wiltshire, England
    MS-Off Ver
    Excel 2007
    Posts
    36

    Auto copy and paste value

    Hi

    This is driving me up the wall so I hope someone can help me.

    I am using the code below to copy a row from one sheet to another sheet and also lock the original row.

    The code works as it should but when the row is pasted into the new sheet it keeps all the formulas etc and I just want the value/text.

    Private Sub Worksheet_Change(ByVal Target As Range)
       If Target.Count > 1 Or Target.Column <> 9 Then Exit Sub
        ActiveSheet.Unprotect Password:="mypass"
    
          If Target.Text = "Yes" Then
             Target.Offset(0, -7).Resize(1, 9).Locked = True
          ActiveSheet.Protect Password:="mypass"
            Target.EntireRow.Copy Destination:=Sheets("Sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
        End If
     
    
    End Sub

    Can someone help me with the missing code please


    Processchip
    Last edited by processchip; 02-17-2011 at 11:57 AM.

Thread Information

Users Browsing this Thread

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

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