ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   print preview enablechanges = false (https://www.excelbanter.com/excel-programming/353343-print-preview-enablechanges-%3D-false.html)

CG Rosén

print preview enablechanges = false
 
Good Morning Group,

The code below gives following; the userform hides and the preview page
is opened and the SetUp and Margins buttons are disabled. When clicking
the Close button on the preview page the above buttons are enabled. At a
second click on the Close button the preview page is closed and the Userform
is showed. How to avoid the second click and the unwanted enabling of the
buttons. Grateful for some hints.

Brgds

CG Rosén


UserForm1.Hide
Application.Visible = True
ActiveSheet.PrintPreview EnableChanges:=False
ActiveSheet.PrintOut Preview:=True
Application.Visible = False
UserForm1.Show




Dave Peterson

print preview enablechanges = false
 
ActiveSheet.PrintPreview EnableChanges:=False
ActiveSheet.PrintOut Preview:=True

Can't you just delete that second line?

"CG Rosén" wrote:

Good Morning Group,

The code below gives following; the userform hides and the preview page
is opened and the SetUp and Margins buttons are disabled. When clicking
the Close button on the preview page the above buttons are enabled. At a
second click on the Close button the preview page is closed and the Userform
is showed. How to avoid the second click and the unwanted enabling of the
buttons. Grateful for some hints.

Brgds

CG Rosén

UserForm1.Hide
Application.Visible = True
ActiveSheet.PrintPreview EnableChanges:=False
ActiveSheet.PrintOut Preview:=True
Application.Visible = False
UserForm1.Show


--

Dave Peterson


All times are GMT +1. The time now is 03:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com