0
Good afternoon to you all, I recorded a macro to generate a report from a spreadsheet that I am feeding with data. Basically the macro will create another workbook in the same worksheet and paste the data vertically (transpose). However, I need to go back to the original spreadsheet and copy another table, then when returning the new worksheet created the macro gives error because of the name of the created worksheet.
ActiveWindow.SmallScroll Down:=-21
Sheets("MUNICÍPIO").Select
ActiveWindow.ScrollColumn = 21
ActiveWindow.ScrollColumn = 22
ActiveWindow.ScrollColumn = 23
ActiveWindow.ScrollColumn = 24
Range("AK5:AN24").Select
Selection.Copy
Sheets("Planilha15").Select
The macro gives an error on this last line, because the file will not select "Spreadsheet 15" again. I would like to resolve this by fixing the name of the spreadsheet to Report, or even any name, just to avoid this error.
Thank you.