Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 88
Default excel print functions

i have a template made up and that part works and looks good. i need a macro
that not print unless the value is true. (ex. if the value in cell a1 = bbb,
it will not print indicating an error on the worksheet.

thank you,

jatman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default excel print functions

You can copy this in the Thisworkbook module for a sheet named Sheet1

Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Sheet1" Then
Cancel = True
Application.EnableEvents = False
With ActiveSheet
If .Range("A1") = "bbb" Then
.PrintOut
End If
End With
Application.EnableEvents = True
End If
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"jatman" wrote in message ...
i have a template made up and that part works and looks good. i need a macro
that not print unless the value is true. (ex. if the value in cell a1 = bbb,
it will not print indicating an error on the worksheet.

thank you,

jatman



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
excel spreadsheet print functions [email protected] Excel Worksheet Functions 1 May 5th 07 12:16 AM
How to print detailed instructions for all functions in Excel? clark Excel Worksheet Functions 1 August 25th 05 10:47 AM
How to print detailed instructions for all functions in Excel? clark Excel Worksheet Functions 0 August 25th 05 04:26 AM
How can I print out a list of statistical functions in Excel (I d. pegberger Excel Worksheet Functions 1 January 5th 05 10:12 PM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM


All times are GMT +1. The time now is 06:09 AM.

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

About Us

"It's about Microsoft Excel"