print preview enablechanges = false

C

CG Rosén

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
 
D

Dave Peterson

ActiveSheet.PrintPreview EnableChanges:=False
ActiveSheet.PrintOut Preview:=True

Can't you just delete that second line?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top