Hi can anyone figure out why I am getting this message..
run time error '1004' Application-defined or object-defined error
Here is my code, the problem line seems to be:
range("A1").Select
here is the rest of the code:
Sub HorizontalLoop()
Dim lCol As Long
Sheets("output").Select
For lCol = 1 To 100
    Dim inputrange As String
        If Not IsEmpty(Cells(lCol).Value) Then
           inputrange = Cells(1, lCol).Value
           ActiveCell.EntireColumn.Select
           Selection.Copy
           Sheets("input").Select
           range("A1").Select
           ActiveSheet.Paste
           Sheets("output").Select
        End If
Next lCol
End Sub
Thank you in advance :)
 
     
     
     
    