View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
traceydee150
 
Posts: n/a
Default VB Script in Excel to copy a row

I've been using the sample spreadsheets from contexture.com. to do my
projects. Helpful doesn't even come close. However, the sample file
called ProductOrderList has a code that when you move over a cell in
column g, it automatically puts an x in the cell, which copies this row
to another sheet within the file. I'm trying to edit the code, to
where you have to put an x in the cell, not just move over it and I'm
not able to do it. Any help??? Here's the code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 7 And Target.Row 6 Then
If Cells(Target.Row, 1).Value < "" Then
Target.Value = "X"
MoveRow
'MsgBox "Row has been copied"
End If
End If
End Sub

As Always, Thanks

TDee