Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel Security
Through data protection, we can lock sheet and workbook.
Is there a way to prevent a user or set a password for printing excel??? |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel Security
Maybe...
You could turn off all printing and then provide a macro that would print under the conditions you want. But this would all depend on macros and macros can be disabled. So it would only be effective if macros are enabled. This goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) MsgBox "Please use the macro/button/whatever to print" Cancel = True End Sub And this goes in a general module (and assigned to a button from the Forms toolbar???): Option Explicit Sub DoMyPrint() Dim pwd As String pwd = InputBox(Prompt:="Enter a Password") If pwd < "TopSecret PassWord Here" Then MsgBox "no printing allowed" Exit Sub End If Application.EnableEvents = False Worksheets("sheet1").PrintOut preview:=True Application.EnableEvents = True End Sub apache007 wrote: Through data protection, we can lock sheet and workbook. Is there a way to prevent a user or set a password for printing excel??? -- Dave Peterson |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel Security
ps.
If you're new to macros: Debra Dalgleish has some notes how to implement macros he http://www.contextures.com/xlvba01.html David McRitchie has an intro to macros: http://www.mvps.org/dmcritchie/excel/getstarted.htm Ron de Bruin's intro to macros: http://www.rondebruin.nl/code.htm (General, Regular and Standard modules all describe the same thing.) apache007 wrote: Through data protection, we can lock sheet and workbook. Is there a way to prevent a user or set a password for printing excel??? -- Dave Peterson |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
Excel Security
Wow, another thing to learn.
I wish in the future excel feature can be added with print protection. Thanks Dave. "Dave Peterson" wrote: Maybe... You could turn off all printing and then provide a macro that would print under the conditions you want. But this would all depend on macros and macros can be disabled. So it would only be effective if macros are enabled. This goes behind the ThisWorkbook module: Option Explicit Private Sub Workbook_BeforePrint(Cancel As Boolean) MsgBox "Please use the macro/button/whatever to print" Cancel = True End Sub And this goes in a general module (and assigned to a button from the Forms toolbar???): Option Explicit Sub DoMyPrint() Dim pwd As String pwd = InputBox(Prompt:="Enter a Password") If pwd < "TopSecret PassWord Here" Then MsgBox "no printing allowed" Exit Sub End If Application.EnableEvents = False Worksheets("sheet1").PrintOut preview:=True Application.EnableEvents = True End Sub apache007 wrote: Through data protection, we can lock sheet and workbook. Is there a way to prevent a user or set a password for printing excel??? -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel security | Excel Discussion (Misc queries) | |||
Security Excel | Excel Worksheet Functions | |||
Excel & Security | Excel Discussion (Misc queries) | |||
Excel Security | Excel Discussion (Misc queries) | |||
Excel Security?? | Excel Discussion (Misc queries) |