-
pagebreakme
hello
what is wrong with............
[VBA]
On Error GoTo err
Dim x As Integer
x = InputBox("select pagemode", "pagebreak")
Select Case x
Case 1
x = ActiveWindow.view = xlPageBreakPreview
Case 2
x = ActiveWindow.view = xlNormalView
End Select
Exit Sub
err:
MsgBox " wrong mode selected"
[/VBA]
thanks
moshe
-
If you put this in the sheet1 code this works for me to produce a print preview page.
[VBA] Sub aa()
Dim x As Integer
x = InputBox("select pagemode", "pagebreak")
If x = "1" Then
ActiveWindow.SelectedSheets.PrintPreview
End If
End Sub [/VBA]
Haven't figured out how to return it to normal view but at least part of the problem is solved.
-
-
hello
can i toggle between...
[VBA] ActiveWindow.view = xlPageBreakPreview[/VBA]
and
[VBA]ActiveWindow.view = xlNormalView[/VBA]
namely can i turn from one to the other in one line?
thanks
moshe
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules