ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Conflict between xlDialogSendMail and xlDialogPrintPreview (https://www.excelbanter.com/excel-programming/275523-conflict-between-xldialogsendmail-xldialogprintpreview.html)

Peter Ostermann

Conflict between xlDialogSendMail and xlDialogPrintPreview
 
Hi folks,

using
Application.Dialogs(xlDialogPrintPreview).Show by itself
it works fine.

The problem happens after I called
Application.Dialogs(xlDialogSendMail).Show


Calling again the preview, of the to be printed page of the
spreadsheet, it also shows up, but is frozen and not
clickable at all. Only option left is that Excel has to be shut
down.

If needed I can post some surrounding code or give
more details. For any hint I will be more than thankful.

Greetings
Peter



Will Francis

Conflict between xlDialogSendMail and xlDialogPrintPreview
 
Hi Steven

You can try inserting the following code into the "This
Workbook" object, it will remove the Share Workbook button
when the sheet is opened and return when the sheet is
closed.

Regards
Will

Private Sub Workbook_Open()
Application.CommandBars("Tools").Reset
Application.CommandBars("Tools").Controls(3).Delet e

End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Select
Application.CommandBars("Tools").Reset
End Sub
-----Original Message-----
Hi folks,

using
Application.Dialogs(xlDialogPrintPreview).Show by

itself
it works fine.

The problem happens after I called
Application.Dialogs(xlDialogSendMail).Show


Calling again the preview, of the to be printed page of

the
spreadsheet, it also shows up, but is frozen and not
clickable at all. Only option left is that Excel has to

be shut
down.

If needed I can post some surrounding code or give
more details. For any hint I will be more than thankful.

Greetings
Peter


.


Peter Ostermann

Conflict between xlDialogSendMail and xlDialogPrintPreview
 
Hi Will,
thanks a lot for your hint. I placed your code
into "This Workbook" object. But it did not
solve the problem yet.

Greetings to UK
Peter

"Will Francis" schrieb im Newsbeitrag
...
Hi Steven

You can try inserting the following code into the "This
Workbook" object, it will remove the Share Workbook button
when the sheet is opened and return when the sheet is
closed.

Regards
Will

Private Sub Workbook_Open()
Application.CommandBars("Tools").Reset
Application.CommandBars("Tools").Controls(3).Delet e

End Sub

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Sheets("Sheet1").Select
Application.CommandBars("Tools").Reset
End Sub
-----Original Message-----
Hi folks,

using
Application.Dialogs(xlDialogPrintPreview).Show by

itself
it works fine.

The problem happens after I called
Application.Dialogs(xlDialogSendMail).Show


Calling again the preview, of the to be printed page of

the
spreadsheet, it also shows up, but is frozen and not
clickable at all. Only option left is that Excel has to

be shut
down.

If needed I can post some surrounding code or give
more details. For any hint I will be more than thankful.

Greetings
Peter


.




Peter Ostermann

Conflict between xlDialogSendMail and xlDialogPrintPreview
 
The problem is for everybody easily reproducible:
1. place a button on a sheet
2. the button calls a form containing 2 buttons:
a. preview
starting: Application.Dialogs(xlDialogPrintPreview).Show by
b. mail
starting: Application.Dialogs(xlDialogSendMail).Show

test preview: it works
test mail: it works
test preview again: result: ***** frozen *****

So, it really seems to be a Microsoft problem !!

isn't there any MVP maintaining this NG who could give me
a helping hand, any hint?
Thanks.

Best Regards
Peter

using
Application.Dialogs(xlDialogPrintPreview).Show by

itself
it works fine.

The problem happens after I called
Application.Dialogs(xlDialogSendMail).Show


Calling again the preview, of the to be printed page of

the
spreadsheet, it also shows up, but is frozen and not
clickable at all. Only option left is that Excel has to

be shut
down.

If needed I can post some surrounding code or give
more details. For any hint I will be more than thankful.

Greetings
Peter


.






Peter Ostermann

Conflict between xlDialogSendMail and xlDialogPrintPreview
 
Hi Sandy,

I tried it. It works. Amazing and strange.
Anyway - the British had been all time good for
to crack the Enigma, right? ;:))
Thanks a lot Sandy.

Greetings to you and good old England
Peter
www.pkf-ostermann.de


"Sandy V" schrieb im Newsbeitrag
...
Hi Peter

See what you mean, fails for me even first time.

This workaround seems OK for me, I'm no expert so don't
ask me why.

'in Userform1
Private Sub CommandButton1_Click()
Application.OnTime Now, "PPreview"
Me.Hide
End Sub

'in a normal module
Sub PPreview()
Application.Dialogs(xlDialogPrintPreview).Show
UserForm1.Show
End Sub

Regards,
Sandy



-----Original Message-----
The problem is for everybody easily reproducible:
1. place a button on a sheet
2. the button calls a form containing 2 buttons:
a. preview
starting: Application.Dialogs

(xlDialogPrintPreview).Show by
b. mail
starting: Application.Dialogs

(xlDialogSendMail).Show

test preview: it works
test mail: it works
test preview again: result: ***** frozen *****

So, it really seems to be a Microsoft problem !!

isn't there any MVP maintaining this NG who could give me
a helping hand, any hint?
Thanks.

Best Regards
Peter

using
Application.Dialogs(xlDialogPrintPreview).Show by
itself
it works fine.

The problem happens after I called
Application.Dialogs(xlDialogSendMail).Show


Calling again the preview, of the to be printed page

of
the
spreadsheet, it also shows up, but is frozen and not
clickable at all. Only option left is that Excel has

to
be shut
down.

If needed I can post some surrounding code or give
more details. For any hint I will be more than

thankful.

Greetings
Peter


.





.





Sandy V

Conflict between xlDialogSendMail and xlDialogPrintPreview
 
Hi Peter,

Thank you for your nice reply, I'm glad it worked.

Re Enigma:

The same people also invented something called a computer
and a discipline called programming. They didn't think to
patent either. And neither did another Brit. (Tim Berners-
Lee) when he invented the WWW. It's just the British way!

Regards,
Sandy

-----Original Message-----
Hi Sandy,

I tried it. It works. Amazing and strange.
Anyway - the British had been all time good for
to crack the Enigma, right? ;:))
Thanks a lot Sandy.

Greetings to you and good old England
Peter
www.pkf-ostermann.de


Snip


All times are GMT +1. The time now is 05:59 AM.

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