View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default printing a range that changes all the time

Hi Pierre

Why don't you filter with autofilter on nonblanks in column B and print

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Pierre via OfficeKB.com" <u13950@uwe wrote in message news:566c60320fbbe@uwe...
Hi Ron,

Thanks you for your input. I checked your site and several questions asked
in this forum about printing in which your name came up each time !

Your code works fine but...

in column B there are some 1000 lines with a formula in them.
only a certain number of cells have actual data in them.
So it would be nice if your formula would only count the rows where the cell
< ""

Any ideas?
thanks,
Pierre

Ron de Bruin wrote:
Try this Pierre

Sub test()
Dim rngprint As Range
Dim lr As Long
Sheets("Outputdlnrs").Select
lr = Range("B" & Rows.Count).End(xlUp).Row
Set rngprint = Range("A1:M" & lr)
rngprint.PrintPreview
End Sub

Hi experts,

[quoted text clipped - 15 lines]
Thanks,
Pierre



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200510/1