macro doesn't use the correct file

  • With the macro I import a filename thats called ' print.prn' (a list of names etc.) which is allways place on my desktop. I rearrange the outcome with the macro and like to print it at the end.

    Now it looks like its only the result of the first time I ran the macro. It should use, when I open the workbook, the file thats on the desktop over and over again. The procedures should start each time when I open the workbook.
    The content of the file (print.prn) changes (more or less names) each day, but now the result is still the same.

    Can someone take a look at the workbook an make the nessacary changes that it will work...


  • Hello,

    try to add this code in your VBa module:


    Sub RemoveTopHeaders()
    Range("1:" & Range("E1").End(xlDown).Row - 1).Delete
    End Sub

    Private Sub Workbook_Open()
    End Sub

    save the workbook and open it again. Does it work now?


Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!