ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Print Preview XL2007 still not working properly (https://www.excelbanter.com/excel-programming/392196-print-preview-xl2007-still-not-working-properly.html)

Steve23

Print Preview XL2007 still not working properly
 
I am using VBA userforms to control/view data input into XL2007 workbook. The
front-end consists of a start-up macro that launches fmMain_Menu and that
form contains various command buttons. Each command button simply shows
another form - e.g. fmReport_Client. The latter contains a combo box (to
select which client), some tick boxes and an OK and a CANCEL command button.
The OK button runs code which formats the report (for the selected client)
and then previews the report. Here's the issue ... If I run the app from
start-up, then the menu-bar within the PrintPreview screen is disabled -- all
the user can do is click the mouse to zoom in/out and click X to close the
preview. Hod do I force the standard menu-bar to be enabled so tha the user
can Print the report? When working in development mode - i.e from VBA - the
menu-bar is always enabled whether I simply test-run the fmReport_Client
userform direct or whether I test-run fmMain_Menu and click the Report
button. I have tried playing with ScreenUpdating True -- doesn't help. (By
the way, do NOT try False as you then get a solid system!) According to the
online help, I should be able to write "[work]sheets("...").PrintPreview
True" to enable the menu buttons - this has no effect! Looks like I am going
to have to create a dialog with the user asking them if they would like to
print the report after they have previewed it.
--
Steve

Jim Rech

Print Preview XL2007 still not working properly
 
Hard to fix a problem you can't reproduce. What are the simplified steps to
recreate it? Maybe you could attach a simplified example.

--
Jim
"Steve23" wrote in message
...
|I am using VBA userforms to control/view data input into XL2007 workbook.
The
| front-end consists of a start-up macro that launches fmMain_Menu and that
| form contains various command buttons. Each command button simply shows
| another form - e.g. fmReport_Client. The latter contains a combo box (to
| select which client), some tick boxes and an OK and a CANCEL command
button.
| The OK button runs code which formats the report (for the selected client)
| and then previews the report. Here's the issue ... If I run the app from
| start-up, then the menu-bar within the PrintPreview screen is disabled --
all
| the user can do is click the mouse to zoom in/out and click X to close the
| preview. Hod do I force the standard menu-bar to be enabled so tha the
user
| can Print the report? When working in development mode - i.e from VBA -
the
| menu-bar is always enabled whether I simply test-run the fmReport_Client
| userform direct or whether I test-run fmMain_Menu and click the Report
| button. I have tried playing with ScreenUpdating True -- doesn't help.
(By
| the way, do NOT try False as you then get a solid system!) According to
the
| online help, I should be able to write "[work]sheets("...").PrintPreview
| True" to enable the menu buttons - this has no effect! Looks like I am
going
| to have to create a dialog with the user asking them if they would like to
| print the report after they have previewed it.
| --
| Steve




All times are GMT +1. The time now is 07:18 PM.

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