Dear all,
See code below. What I am trying to do is to use an input box for the user to type in the Row in which to copy the entire row from. E.g. if he chooses 3, "ChooseRow" will be 3 and from there I want to be able to copy selected data from row 3.
Error happens in red below. Unable to choose row 3, if user inputted 3 as his desired row. Any help greatly appreciated. Thanks!
Code
Dim RowCount As Integer
Dim ChooseRow As Integer
xpproduction.Activate
RowCount = ActiveSheet.AutoFilter.Range.Columns(1).SpecialCells(xlCellTypeVisible).Cells.Count - 1
If RowCount > 1 Then
ChooseRow = InputBox("please select the row you want")
Set copyRange = ActiveSheet.Range("A2:A" & ChooseRow + 1) 'ERROR LINE
copyRange.SpecialCells(xlCellTypeVisible).Copy
Display More
NOTE: Please use code tags around your code, I have added them for you this time.