How can I change this routine to allow the user to choose the workbook and worksheet in which to copy items to.
Code:
Sub CopyItems()
Dim intRowS As Integer, intRowT As Integer
Dim strComprehend As String
strComprehend = InputBox("KeyWord:", , "")
If strComprehend = "" Then Exit Sub
intRowS = 10
intRowT = 10
Do Until IsEmpty(Cells(intRowS, 1))
If Cells(intRowS, 6) = strComprehend Then
Rows(intRowS).Copy Worksheets("Sheet2").Rows(intRowT)
intRowT = intRowT + 1
End If
intRowS = intRowS + 1
Loop
Worksheets("Sheet2").Columns.AutoFit
Worksheets("Sheet2").Select
End Sub