ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Printpreview problem - disable various buttons (https://www.excelbanter.com/excel-programming/327045-printpreview-problem-disable-various-buttons.html)

Raymond

Printpreview problem - disable various buttons
 
Using Excel 2000 vba I would like to

1. disable the <PRINT button and other buttons programmatically.

2. tab from button to button.

3. be able to view the PrintPreview picture programmatically.

Your help will be appreciated.

Raymond


Jake Marx[_3_]

Printpreview problem - disable various buttons
 
Hi Raymond,

Raymond wrote:
Using Excel 2000 vba I would like to

1. disable the <PRINT button and other buttons programmatically.


You can disable the print button with this:

Application.CommandBars.FindControl(ID:=2521).Enab led = False

I found the ID by doing this in the immediate window:

?application.CommandBars("Standard").Controls(6).c aption
Print (<my printer)

?application.CommandBars("Standard").Controls(6).i d
2521

2. tab from button to button.


Not sure what you mean by this.

3. be able to view the PrintPreview picture programmatically.


ActiveSheet.PrintPreview False

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


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

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