Me.ShowDialog Causing the Excel Print Preview Can't Work

Add-in Express™ Support Service
That's what is more important than anything else

Me.ShowDialog Causing the Excel Print Preview Can't Work
 
Jun Wei Ng




Posts: 33
Joined: 2019-10-01
Hi There,

In Microsoft Excel, I have integrated my own function to Microsoft Excel.

There is a new tab with new button.

When the button is clicked, a form will show using Me.ShowDialog.

In that form I have an option (using checkbox, when users check the checkbox, it will perform print preview) to allow print preview for Excel documents.

The print preview for Excel documents is working, but the form keep showing in front, causing users unable to scroll down and up to preview the other sheets.

This doesnt happen if using Microsoft Word.

Code that shows print preview in Microsoft Excel:

_appOffice.Worksheets(xlSheets).PrintPreview

If the code runs before Me.ShowDialog, users are able to scroll up and down to preview the other sheets.

Best Regards,
Jun Wei
Posted 19 Nov, 2019 23:34:38 Top
Andrei Smolin


Add-in Express team


Posts: 17360
Joined: 2006-05-11
Hello Jun,

Consider using a pane instead of a form.

Regards from Belarus (GMT+3),

Andrei Smolin
Add-in Express Team Leader
Posted 20 Nov, 2019 03:48:52 Top