Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default 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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
stumped LarryK Excel Worksheet Functions 4 March 28th 09 05:54 PM
Stumped bad, need help please! Kevin Excel Worksheet Functions 10 April 12th 08 10:36 PM
Stumped Jake Excel Discussion (Misc queries) 4 November 21st 06 01:09 PM
Stumped Andibevan[_4_] Excel Programming 6 December 23rd 05 03:03 PM
Stumped Sheeny[_21_] Excel Programming 3 June 23rd 04 07:28 PM


All times are GMT +1. The time now is 08:57 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"