• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

Need to disable print function in Excel 2003.

Hi Experts,

I need to disable print function on one of the excel 2003 file. I will put that excel file on file server, user can only view it and cannot print.
Please advise me.

Thanks
0
koala-london
Asked:
koala-london
  • 3
  • 3
1 Solution
 
SiddharthRoutCommented:
Try this

Sub DisableMenuItems()
    With CommandBars("File")
        .Controls(15).Enabled = False 'Print Button
    End With
End Sub

Open in new window


Sid
0
 
SiddharthRoutCommented:
One more way.

paste this code in the workbook code area :)

Private Sub Workbook_BeforePrint(Cancel As Boolean)
    Cancel = True
End Sub

Open in new window


Sid
0
 
koala-londonAuthor Commented:
Still doesn't work. I think the excel doesn't enable macro.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
SiddharthRoutCommented:
Yes to run the above code, you will have to enable macros. To enable macros, Click on menu tools, Macros and security. Set the level to low.

Sid
0
 
koala-londonAuthor Commented:
thanks .
0
 
koala-londonAuthor Commented:
thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now