I first posted this in the office forum, but Skip sensibly suggested I try here. So here goes...
This is driving me nuts.
I have an Excel workbook with several sheets, including chart sheets. I have set this up to show several of the sheets in their own windows, including the charts (and some of the rest - mainly as an "input area"). I need to let the user click a point on one of the charts, so that the workbook can detect the mouse down event and change the rest of the display accordingly. I have the code to do this.
I also want him to be able to rearrange the windows, including resizing them, as appropriate, to accomodate detailed views on his display of interest. This works fine in 2003, with the chart sheets set to "Sized to window", but fails when I use it in 2010, as the size to window option seems to be missing.
Having checked where Skip suggested, it seems that microsoft have removed this facility, whereby the chart stretches to fit the resized window as it changes (which is what I want) and replaced it with the zoom to fit button, which has to be selected manually by the user and always keeps the same aspect ratio.
So, does anyone have a workaround in code?
I had a look at the chart object. It does have a sizewithwindow property, but when I set this to true in code, although it does not throw an error, it also does not change the state of the property - which remains at "false".
So I thought I might be able to detect the window resize event and change the chart dimensions to fit the new size, but I'm not sure how to access the window resize event, or the chart dimensions.
Any suggestions greatly appreciated.
Thanks,
Tony
p.s. Hi guys - it's been a while...
This is driving me nuts.
I have an Excel workbook with several sheets, including chart sheets. I have set this up to show several of the sheets in their own windows, including the charts (and some of the rest - mainly as an "input area"). I need to let the user click a point on one of the charts, so that the workbook can detect the mouse down event and change the rest of the display accordingly. I have the code to do this.
I also want him to be able to rearrange the windows, including resizing them, as appropriate, to accomodate detailed views on his display of interest. This works fine in 2003, with the chart sheets set to "Sized to window", but fails when I use it in 2010, as the size to window option seems to be missing.
Having checked where Skip suggested, it seems that microsoft have removed this facility, whereby the chart stretches to fit the resized window as it changes (which is what I want) and replaced it with the zoom to fit button, which has to be selected manually by the user and always keeps the same aspect ratio.
So, does anyone have a workaround in code?
I had a look at the chart object. It does have a sizewithwindow property, but when I set this to true in code, although it does not throw an error, it also does not change the state of the property - which remains at "false".
So I thought I might be able to detect the window resize event and change the chart dimensions to fit the new size, but I'm not sure how to access the window resize event, or the chart dimensions.
Any suggestions greatly appreciated.
Thanks,
Tony
p.s. Hi guys - it's been a while...