Friends, I am trying to copy a range of cells that encompass two columns and paste it into another workbook.
The range will/could be added to at any given time so the code has to be able to go to the last cell with data. Here is the code I have so far but I cannot get it to work. Any ideas would be helpful!
Sub Find_Performance_Log()
Dim FindString As String
Dim Comment As String
Dim Rng As Range
Application.ScreenUpdating = True
'Comment =
Worksheets("Submit Comment").Range("C21").Value = "Comment Date"
Worksheets("Submit Comment").Range("D21").Value = "Comment"
Worksheets("Submit Comment").Range("E21").Value = "Executive"
FindString = Sheets("Submit Comment").Range("B14").Value
If Trim(FindString) <> "" Then
With Sheets("Employees").Range("A:A")
Set Rng = .Find(What:=FindString, _
After:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not Rng Is Nothing Then
Application.Goto Rng, True
ActiveCell.Offset(1, 1).Select
'ActiveCell.Name = Comment
ActiveCell.End(xlDown).End(xlToRight).Copy
Worksheets("Submit Comment").Activate
Worksheets("Submit Comment").Range("C22").Paste
' ActiveCell.EntireRow.Offset(1, 0).Insert
' ActiveCell.Offset = Now()
' ActiveCell.Offset(0, 1) = Sheets("Submit Comment").Range("D6").Value
' Worksheets("Submit Comment").Activate
' MsgBox "Your comment has been submitted."
' Range("D6").ClearContents
' Workbooks("Performance Log.xlsm").Save
Else
MsgBox "No Records found on associate"
End If
End With
End If
End Sub
Bookmarks