View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Cone Jim Cone is offline
external usenet poster
 
Posts: 3,290
Default Only print cells with values

You don't provide much information.
This short piece of code will print each row
in the selection. It will skip any blank rows.
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware

Sub PrintEachRow()
'Jim Cone - San Francisco, USA - 06/30/2005
Dim rngPrint As Excel.Range
Dim rngRow As Excel.Range
Set rngPrint = Application.Intersect(Selection, ActiveSheet.UsedRange)

If Not rngPrint Is Nothing Then
For Each rngRow In rngPrint.Rows
If Application.CountA(rngRow) 0 Then
rngRow.PrintOut copies:=1
End If
Next
End If
Set rngPrint = Nothing
Set rngRow = Nothing
End Sub
'--------------

"Oldjay"

wrote in message
I have a membership list that lists the church contributions made each week
and also gives the total cntributions for the year.
I want to print out a separate form for each member that has contributed
money during the year for income tax purposes
Thanks in advance