Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Selective Worksheet printing

Does anyone have any routines available which will allow one to print off
worksheets in a spreadsheet which have entries in them, e.g. worksheets 1,
4, and 5 will have data in whereas 2 and 3 are empty?

Thanks in advance

Colin


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Selective Worksheet printing

Colin, do you mean you want the routine to determine which worksheets are
empty and print only those worksheets that are not empty? James

"Colin Telfer" wrote in message
...
Does anyone have any routines available which will allow one to print off
worksheets in a spreadsheet which have entries in them, e.g. worksheets 1,
4, and 5 will have data in whereas 2 and 3 are empty?

Thanks in advance

Colin



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 373
Default Selective Worksheet printing

Colin, copy the following code and paste it in a standard module. It
determines which worksheets contain data and prints them, skipping the ones
without data. Note that it is only concerned with the active workbook and
only looks for cell data. It does not look for things such as formatting
and comments. HTH, James

Sub PrintNonEmpty()
'prints all non-empty worksheets in active workbook
Dim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
If WorksheetFunction.CountA(Cells) < 0 _
Then ws.PrintOut
Next ws
End Sub

"Zone" wrote in message
...
Colin, do you mean you want the routine to determine which worksheets are
empty and print only those worksheets that are not empty? James

"Colin Telfer" wrote in message
...
Does anyone have any routines available which will allow one to print off
worksheets in a spreadsheet which have entries in them, e.g. worksheets
1,
4, and 5 will have data in whereas 2 and 3 are empty?

Thanks in advance

Colin





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
Selective printing of worksheet Zygy[_3_] New Users to Excel 3 October 11th 07 12:59 PM
Selective Automated Printing of External Files Eric Excel Programming 0 September 2nd 07 11:32 AM
Selective Printing of Excel Worksheets using Macro Daniel Clough Excel Programming 1 May 23rd 07 01:29 PM
Selective Worksheet Deletion Neal Zimm Excel Programming 2 August 10th 06 04:13 AM
Selective Protection of a Worksheet DCMyers1 Excel Programming 2 December 30th 03 08:06 PM


All times are GMT +1. The time now is 07:33 PM.

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"