View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jake Marx[_3_] Jake Marx[_3_] is offline
external usenet poster
 
Posts: 860
Default 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]