Still stumped with printing macro
This should do what you want:
Private Sub Workbook_BeforePrint(Cancel As Boolean)
dim sPassword as String
sPassword = InputBox("Enter the password")
if Not sPassword = "WhatEverThePasswordIs" Then
Cancel = True
MsgBox "Information contained in this workbook cannot be printed"
Else
ActiveSheet.PrintOut
End If
End Sub
Regards,
GS
|