I am having a problem printing in excel using vba. I need to be able to select a range from B102 to G146, but print only the cells in this row that have data in them. Any help would be greatly appriciated.
Steve Warker
Printable View
I am having a problem printing in excel using vba. I need to be able to select a range from B102 to G146, but print only the cells in this row that have data in them. Any help would be greatly appriciated.
Steve Warker
You could delete the rows without information by testing for empty cells and then print.
If you can't delete the rows in your worksheet, copy it to a new sheet and delete rows in the new sheet. That way your original would stay the same.
As far as deleting in a range, I would use a loop that moves across a given row. If it encounters anything, drop down to the next row. If it doesn't encounter anything, delete the row and start at the first cell of the next row.
never mind, i figured it out using a for each and and if statement. Thanks everyone.
Stve