Forum Discussion
Ron_P88
Aug 04, 2020Copper Contributor
Set print range in VB macro
I need to set the print range within a VB for a table that has variable length from run to run. The table is made up of the sum of multiple subtotals, all of which change from run to tun. That only m...
NikolinoDE
Aug 05, 2020Platinum Contributor
Tailored to your area.
If other area is desired or the whole worksheet it can be changed by VBA.
Hope this worksheet meets your needs. If not please give a short feedback.
If other area is desired or the whole worksheet it can be changed by VBA.
Hope this worksheet meets your needs. If not please give a short feedback.
Nikolino
I know I don't know anything (Socrates)
Ron_P88
Aug 05, 2020Copper Contributor
Sorry but when I execute your sub on my file before a print range is set I get a 4 page display of the entire worksheet rather than the y2:AD312 range that this week's data calls for. Another week with different data would call for a range of y2 to some other lower bound.
- NikolinoDEAug 05, 2020Platinum ContributorYou have to determine in advance which area you want to print, if the lines in this area are empty should not be printed or hidden, this means selecting a large printing area in advance depending on the data that can occur ... is this correct?... what I have expressed.