Hello all,

I have been trying to open a notepad file, copy and paste the contents to excel with the following code:

Sub ImportText() 
    Dim Text 
    Dim i As Long 

    Application.ScreenUpdating = False 
     'put your own path below
    Open ActiveWorkbook.Path & "\MYFILE.txt" For Input As #1 
    i = 1 
    Do While Not EOF(1) ' Loop until end of file.
        Input #1, Text 
        Range("a" & i) = Text 
        i = i + 1 
    Loop 
    Close #1 
End Sub
the code does copy the contents to column A but the data covers from A to I.

Can someone tell me how to edit the code so it takes the contents and pastes over A to I? I am not a coder and not really sure how to do this.

Thanks in advance.