Excel macro to insert carriage return

前端 未结 1 1634
失恋的感觉
失恋的感觉 2021-01-19 01:02

In my research, I\'ve encountered two possibilities for inserting a carriage return into a header in a VBA macro, using Chr(10) or Chr(13). I\'ve even seen code posted by A

1条回答
  •  鱼传尺愫
    2021-01-19 01:48

    Agree with Patrick H. This code works ...

    Sub header()
    With ActiveSheet.PageSetup
        .CenterHeader = "&F" & vbCrLf & "&A"
    End With
    End Sub
    

    0 讨论(0)
提交回复
热议问题