Hi all!
I need your help and expertise once again.
The macro in this worksheet links cell B2 to the footer. So when you type into cell B2, it updates the Footer (and places whatever text you just typed into cell B2 into the left Footer location).
Problem is, when I type into B2 and press enter, the view changes - - the contents of page one extends to another page (page one only showing columns A through F, instead of A through H).
And the only way to make it appear normal is to go into print preview then back to sheet.
Not sure if this has any bearing, but I am viewing in Page Layout view, with a custom zoom of 100%
Thanks so much in advance for any insight!
Macro used:
Sub AddFooterToAll()
'Update 20140318
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection.Range("A1")
Set WorkRng = Application.InputBox("Range (single cell)", xTitleId, WorkRng.Address, Type:=8)
For Each ws In Application.ActiveWorkbook.Worksheets
ws.PageSetup.LeftFooter = WorkRng.Range("A1").Value
Next
End Sub
This question also posted under the following link:
https://www.excelforum.com/excel-fo...er-macro-is-run-page-layout-view-changes.html
I need your help and expertise once again.
The macro in this worksheet links cell B2 to the footer. So when you type into cell B2, it updates the Footer (and places whatever text you just typed into cell B2 into the left Footer location).
Problem is, when I type into B2 and press enter, the view changes - - the contents of page one extends to another page (page one only showing columns A through F, instead of A through H).
And the only way to make it appear normal is to go into print preview then back to sheet.
Not sure if this has any bearing, but I am viewing in Page Layout view, with a custom zoom of 100%
Thanks so much in advance for any insight!
Macro used:
Sub AddFooterToAll()
'Update 20140318
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection.Range("A1")
Set WorkRng = Application.InputBox("Range (single cell)", xTitleId, WorkRng.Address, Type:=8)
For Each ws In Application.ActiveWorkbook.Worksheets
ws.PageSetup.LeftFooter = WorkRng.Range("A1").Value
Next
End Sub
This question also posted under the following link:
https://www.excelforum.com/excel-fo...er-macro-is-run-page-layout-view-changes.html
Last edited: