Printing on Excel through macros


Posted by jamie on August 29, 2000 1:35 PM

Our entire database for estimating is on Lotus. We are converting that database to Excel. There is a situation though. We had created a macro that only printed the pages that had new data (for instance, a sheet that had a total value at the bottom would have a number on the far right. The macro would read that that was an active page and printed it. If it didn't have a number, it would not.). Is there a way to create this kind of a macro in excel? Thanks



Posted by Celia on August 29, 0100 5:16 PM


Assuming that when there is a number it is always in the same cell (say, H20), something like this could probably be used :-

Dim ws As Worksheet
For Each ws In Worksheets
If ws.Range("H20") <> "" Then
ws.PrintOut
End If
Next ws

Celia