I am assembling a macro that opens a specific report that copies the data, and then pastes it into another worksheet on a particular sheet . But I'm having a hard time sticking to the other spreadsheet.
So far we have:
Dim as Integer
Data= Sheets("nome da sheet").Range("A1")
Range("A1").Value = Data
Workbooks.Open Filename: =
"Caminho do relatório\nome do relatório" & Data & ".xlsm"
Range("A2","R16").Copy
Active.Sheet("nome da sheet")
Range(A5,R65).pastespecial
And you get the error message 424 ;
Now comes the problem. I can not paste this report into the worksheet (by the way this worksheet is where I'm mounting the macro)