Discussion Locked

Excel Macro for printing

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I want to write a macro in Excel which is assigned to a command button that when pressed will print out multiple sheets if data is in a given cell, but will not print the sheet if the given cell is empty. Anyone have an idea?

3 replies

by juergen hartl

Application.ScreenUpdating = False
Dim w As Worksheet
dim r as range
For Each w In ActiveWorkbook.Worksheets
Set r = w.Cells(row,col)
if r.Value<>"" then
w.PrintOut
end if
next

by dav.owen

This did not work for me but if anyone has the same problem I have designed a macro that has worked for several clients

This discussion is closed to new replies.