you always can use
Tools > Macro > rocord new macro

then do the job on one worksheet

the stop the recording and sse the vba code.
(this will help next time)


But today, and in your case, I suggest
ActiveWorkbook.Sheets.HPageBreaks.Add Before:=Rows(8)

one line
all the job done

(before row 8 in this example)