PC Review


Reply
Thread Tools Rate Thread

Can't Paste after Changing Cell Properties

 
 
bg_ie@yahoo.com
Guest
Posts: n/a
 
      1st Aug 2007
Hi,

I'm using the following code to correct and flag changes on my
datasheet. There is a problem though. If I try pasting in data into my
datasheet, I can only do it once. The reason is due to changing the
cell color. To quickly test this, if you copy a cells and paste it
into another cell then change the color of any cell, you won't be able
to paste the copied data again into another cell. It seems that
changing the cell color, or indeed other cell properties, breaks the
link to the clipboard. But I must indicate to the user that a cell has
been updated, and I'd like them to be able to paste the same data
multiple times. Any suggestions?

Thanks,

Barry.

it seems that when you attempt to paste for the second time, you
can't.

Private Sub Worksheet_Change(ByVal target As Range)

If Not target Is Nothing Then

For Each cell In target.Cells
' only allow "X" or "" in cell
If cell.value <> "" And cell.value <> "X" Then
cell.value = "X"
' flag that the cell has been changed
Else
cell.Interior.Color = vbYellow
End If
Next cell

End If
End Sub

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I paste WITHOUT cell references changing (and without usingabsolute cell addresses) [EXCEL2003 SP3] ship Microsoft Excel Discussion 8 10th Nov 2008 12:24 PM
Changing Cell Properties Interfering with Clipboard bg_ie@yahoo.com Microsoft Excel Programming 0 27th Jul 2007 09:40 AM
Cell changing it's properties jtpeters Microsoft Excel New Users 0 27th Dec 2005 10:09 PM
Copy and Paste macro needs to paste to a changing cell reference =?Utf-8?B?bG91bG91?= Microsoft Excel Programming 0 24th Feb 2005 10:29 AM
Changing the _default_ Paste options to paste cell contents only? Michael Baglio Microsoft Excel Discussion 11 13th Jan 2005 10:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:58 AM.