Roderick_E
Well-known Member
- Joined
- Oct 13, 2007
- Messages
- 2,051
I'm trying to fit some charts within a pagebreak. I've done it manually and it works fine but now I've found users changing the width of columns and rows (I don't want to protect sheet), so it mess up my manual settings. I'd like to determine the width and height of the first pagebreak (all the rest are same).
Sample of what I'm currently doing:
Would be great if the
Any ideas how to accomplish? Thanks
Sample of what I'm currently doing:
Code:
baseleft = 232
basewidth = 450 'halfway
baseheight = 274 'halfway
ActiveSheet.ChartObjects(Replace(element, Right(element, 3), "")).Left = baseleft
ActiveSheet.ChartObjects(Replace(element, Right(element, 3), "")).Width = basewidth * 2
ActiveSheet.ChartObjects(Replace(element, Right(element, 3), "")).Height = baseheight * 2
Would be great if the
- baseleft was determined by left edge of pagebreak.
- basewidth was determined by left edge of entire sheet + middle of pagebreak (halway horizontal)
- baseheight was determined by top of pagebreak to middle of pagebreak (halfway verticle)
Any ideas how to accomplish? Thanks