질문 :

인쇄시 헤더의 텍스트를 변경하는 방법.

아래 코드를 일반 모듈에 넣으십시오.

Sub VariableRow()

Dim intCount As Integer, intCounter As Integer

Range("A1").Select

intCount = ExecuteExcel4Macro("INDEX(GET.DOCUMENT(50),1)")

Sheet1.PageSetup.PrintTitleRows = "1:1"

For intCounter = 1 To intCount

Range("A1").Value = "RepetitionLine " & intCounter & ". Page"

ActiveSheet.PrintOut from:=intCounter, to:=intCounter

Next intCounter

Range("A1").Value = "RepetitionLine"

End Sub