(Solved) – Using Current Region in VBA curropts my Excel

Workbooks("2020.outcomes.csv").Worksheets("2020.outcomes").Range("A1").CurrentRegion.Copy _
    ThisWorkbook.Worksheets("2020 outcomes").Range("A1")

I need to copy data from a sheet called 2020.outcomes in 2020.outcomes.csv to my current workbook’s 2020 outcomes sheet. The data range in the source CSV can vary and that’s why I am using CurrentRegion, but as soon as the above code is executed my workbook crashes and I am unable to open it again. What am I doing wrong? Thanks in advance.

Leave a Reply

Your email address will not be published. Required fields are marked *