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

(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")

Hi,
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 *