Sub MyFooter()
Dim xTxt As String
Dim xAddress As String
Dim xRg As Range
Dim xCell As Range
On Error Resume Next
xAddress = ActiveWindow.RangeSelection.Address
Set xRg = Application.InputBox("Select the row you will insert repeatedly at the bottom:", "Kutools for Excel", xAddress, , , , , 8)
If xRg Is Nothing Then Exit Sub
For Each xCell In xRg
xTxt = xTxt & xCell.Value & " "
Next
ActiveSheet.PageSetup.LeftFooter = xTxt
End Sub
No comments:
Post a Comment