M
mrLee
hi,office developers.
i have this macro just for test.
but not return to xlnormalview on the copied sheet.
i'd very appreciated for any comments what the problem with below macro.
thanks in advance.
Sub Macro1()
Dim ViewMode As Long
ActiveSheet.Select
Range("A1") = 1
Range("D20") = 1
ActiveWindow.View = xlPageBreakPreview
ActiveSheet.Copy AFTER:=ActiveSheet
With ActiveSheet
.Select
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView
End With
ActiveWindow.View = ViewMode
End Sub
i have this macro just for test.
but not return to xlnormalview on the copied sheet.
i'd very appreciated for any comments what the problem with below macro.
thanks in advance.
Sub Macro1()
Dim ViewMode As Long
ActiveSheet.Select
Range("A1") = 1
Range("D20") = 1
ActiveWindow.View = xlPageBreakPreview
ActiveSheet.Copy AFTER:=ActiveSheet
With ActiveSheet
.Select
ViewMode = ActiveWindow.View
ActiveWindow.View = xlNormalView
End With
ActiveWindow.View = ViewMode
End Sub