LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 148
Default Macro - edit with macro

Hi,

I share a workbook with several sheets and macros with my officemates. I
have this macro so they cannot print any of the worksheets.

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

However, when I out of town, and the reports needs to be printed, I'd like
to e-mail them another workbook to edit the macro above and replace it with
the macro below.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If Date < VBA.DateSerial(2007, 8, 17) Then
Cancel = True
End If
End Sub

The original workbook VBA Project Password is "OPENPW". Both workbooks will
have the same VBA Project Password.

Thank you.

 
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
can macro edit text? LydiaD Excel Worksheet Functions 7 October 27th 06 07:38 AM
I know you can't run a macro while in edit mode, but... [email protected] Excel Discussion (Misc queries) 5 July 21st 06 03:40 AM
How do I edit this macro? Mallers Excel Discussion (Misc queries) 5 April 24th 06 07:32 PM
Edit Macro 1st time use sparx Excel Discussion (Misc queries) 1 March 12th 06 04:04 PM
Macro to edit formula Tang123 Excel Discussion (Misc queries) 2 October 6th 05 08:33 PM


All times are GMT +1. The time now is 06:04 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"