PDA

View Full Version : [SOLVED:] Help with resetting view when clicking "Close" command button



janaboo13
08-29-2011, 01:23 PM
Greetings All!
I'm struggling with an issue and need some help! I have a userform that contains five macros. I can run all the macros and then close, or run whichever ones I want and then close.

When I run the first macro, I change the page view to this:

ActiveWindow.ActivePane.View.Zoom.PageFit = wdPageFitFullPage

I also have another macro that changes the page view to this:

ActiveWindow.View.Zoom.PageFit = wdPageFitBestFit

What I'd like to do is reset the page view to two pages. This is the macro I run when I open a document:

With ActiveWindow.View
.Type = wdPrintView
With .Zoom
.PageColumns = 2
.PageRows = 1
End With
End With

The code for the "Close" button is this:

Private Sub CloseButton_Click()
CleanUp.Hide
End Sub

I can't for the life of me figure out how to reset the view when I click the "Close" button. Any suggestions would be appreciated.