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: 58
Default Copy / Paste Not working with Target.value

Hi All!

I have a spreadsheet which records data entered into a "Main" tab onto an
"Updates" tab. In the code behind for the "Main" tab I am grabbing the data
with:

Case 3
valueChanged = Target.Value

The valueChanged then shows up on the "Updates" tab, code included below. My
problem occurs when I copy and paste into multiple cells it doesn't recognize
a change in the cell value I'm pasting into. Any ideas how to correct this?

Here is an example code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim dbTable As String
Dim dbCol As String
Dim keyRecord As Variant
Dim valueChanged As Variant
Dim x As Integer
Dim strDup As String
If Target.Row 2 And Cells(Target.Row, 70).Value < "" And Sheets("Mobility
2010 Build List").Range("F1").Value = "YES" Then
Select Case Target.Column
Case 1
valueChanged = Target.Value
End Select

x = 3

Do Until Sheets("Updates").Cells(x, 1).Value = ""
If dbCol = Sheets("Updates").Cells(x, 3).Value And keyRecord =
Sheets("Updates").Cells(x, 2).Value Then
strDup = "Y"
GoTo Duplicate
End If
x = x + 1
Loop
strDup = ""
'Jump point for above do until loop to exit loop if duplicate entry detected.
Duplicate:

Sheets("Updates").Cells(x, 4).Value = valueChanged
If strDup = "Y" Then
Sheets("Updates").Cells(x, 5).Value = ""
End If
End If
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
Copy paste only working once Danny Excel Discussion (Misc queries) 2 February 17th 09 09:38 AM
copy/paste not working chicago1 Excel Worksheet Functions 3 March 5th 08 05:20 PM
Copy and Paste Not Working dstromain Excel Discussion (Misc queries) 1 October 14th 05 01:39 PM
copy paste is not working Becky1810 Excel Discussion (Misc queries) 1 July 16th 05 02:12 PM
Sub to copy a target sheet from slaves from and paste/overwrite into master Max Excel Programming 19 June 14th 05 02:22 AM


All times are GMT +1. The time now is 01:33 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"