Hey guys,
My macro is searching for a string in a cell, then upon finding it, select the entire row and copy/paste it to another sheet. However, I am getting a "Select method of Range class failed" error message when I try to select the entire row. Can someone check this out?
If ComboBox1.Value = "CA" Then
While Len(Sheets("Trades").Range("W" & CStr(LSearchRow)).Value) > 0
If Sheets("Trades").Range("K" & CStr(LSearchRow)).Value = "CA" Then
Sheets("Trades").Rows(CStr(LSearchRow) & ":" & CStr(LSearchRow)).Select
Selection.Copy ' This is where the error hits
'Paste row into Summary sheet in next row
Sheets("Summary").Select
Rows(CStr(LCopyToRow) & ":" & CStr(LCopyToRow)).Select
ActiveSheet.Paste
'Move counter to next row
LCopyToRow = LCopyToRow + 1
'Go back to Sheet1 to continue searching
Sheets("Trades").Select
End If
LSearchRow = LSearchRow + 1
Wend
End If
TIA!
Bookmarks