Bind Event Prior to Print Preview

C

Corey C.

I have a VFP9.0 application that uses an Excel 2003 workbook for a portion of
the user data entry. Because of the complexity of the workbook, the print
functionality per worksheet is automated using VBA code. To remove the
screen flicker in the custom print function the Application.ScreenUpdating
property is set to False until after the custom print is finished (either the
user prints the report or closes out of print preview).

In our upgrade to Excel 2007, it was discovered that shutting off the
ScreenUpdating property would keep the ribbon bar from updating and changing
to the print preview ribbon bar during this custom function. This would
leave the user with out any way to do anything in the print preview screen,
unless they knew the keyboard commands. With out the proper ribbon bar being
available the only way out of the the print preview screen is to 'Esc'ape out.

Because the print function is embedded in VBA code within the same workbook
that the users are doing their data entry, replacing the workbook with a new
one that has the code fix is impossible.

My current idea of a fix is to Bind to a VBA event using VFP code to set the
ScreenUpdating property to True right before the print preview screen is
shown. However I can't find the right VBA event to bind to. Any suggestions
would be greatly appreciated.

Thanks,

Corey C.
 

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