View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default 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