I need to set the Print area to a selection of cells but the selection will be different every time. Is there a way of setting the Print area to the current selection?
if you are manually selecting the range to print
or:
LRow = range("A65536".end(xlup).row
LCol - rnage("IV1".end(xltoleft).column
Activesheet.pagesetup.printarea = range(cells(1,1),cells(LRow,LCol))
If you just want to sleect the whole range of used data
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.