karrims
11-20-2007, 12:13 PM
You guys really helped me last time...hope you can help again. I have the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NextRow As Long
On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, Me.Columns(7)) Is Nothing Then
If Target.Value >= Range("$A$1") Then
With Worksheets("Since Last Meeting")
NextRow = .Range("A1").End(xlDown).Row
If NextRow = 1 And .Cells(NextRow, "A").Value = "" Then
Else
NextRow = NextRow + 1
End If
Target.EntireRow.Copy .Cells(NextRow, "A")
End With
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub
Here's what I want to do:
1. user inputs a date into cell A1 of sheet1 (named "2007 Filled").
2. user enters a date into any cell in column G (same sheet).
3. if date in G is >= the date in A1, copy entire row to sheet2 (named "Since Last Meeting")
4. Delete entire rows from sheet2 with dates in G that are < date in A1 of sheet1.
Confused yet?!? :bug:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim NextRow As Long
On Error GoTo ws_exit
Application.EnableEvents = False
If Not Intersect(Target, Me.Columns(7)) Is Nothing Then
If Target.Value >= Range("$A$1") Then
With Worksheets("Since Last Meeting")
NextRow = .Range("A1").End(xlDown).Row
If NextRow = 1 And .Cells(NextRow, "A").Value = "" Then
Else
NextRow = NextRow + 1
End If
Target.EntireRow.Copy .Cells(NextRow, "A")
End With
End If
End If
ws_exit:
Application.EnableEvents = True
End Sub
Here's what I want to do:
1. user inputs a date into cell A1 of sheet1 (named "2007 Filled").
2. user enters a date into any cell in column G (same sheet).
3. if date in G is >= the date in A1, copy entire row to sheet2 (named "Since Last Meeting")
4. Delete entire rows from sheet2 with dates in G that are < date in A1 of sheet1.
Confused yet?!? :bug: