-
Disable Print Preview in dialogue box
When I call the print dialogue box via Application.Dialogs(xlDialogPrint).Show, clicking the print preview crashes my workbook. I google for a solution and came across this code...
[VBA]Application.Dialogs(xlDialogPrint).Show (preview = False)[/VBA]
but it errors highlighting preview. I'm kindly looking for assistance for a solution this problem. Thanks
I'm currently using excel 2007, but I have other computers that have excel 2000 - 2010.
-
Try this, disables print preview from the main menu, but if you take the option to print you will still see it, unless you disable print.
ps dont forget to turn it back on !
[vba]
Sub MenuControl_Enabled_False_2000_2003()' Excel 2000 - 2003
Dim Ctrl As Office.CommandBarControl
For Each Ctrl In Application.CommandBars.FindControls(ID:=109)'print ID:=4
Ctrl.Enabled = False
Next Ctrl
End Sub
[/vba]
Rob
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