![]() |
Chart Placement incorrect in macro due to differant screen resolutions
Hi Team,
Hoping you can help me out with this one which I immagine is pretty common. I have created a a macro which in turn creates a series of charts to display. While on my machine they appear perfectly placed, when other users access the macro the charts will be a differant dimension and not in the right place. Of course this is very frustrating for other users, no so much myself however :) I was hoping there was a way to define possibly by Cell Referance where the charts appear? All help will be greatly appreciated. Thanks, Luke |
Chart Placement incorrect in macro due to differant screen resolut
Charts are placed by there .left and .top location. A cell also has a .left
and .top property. If you had the chart name you could do something like this for each chrt in activesheet.shapes chrt.top = Range("B5").top chrt.left = Range("B5").right next chrt " wrote: Hi Team, Hoping you can help me out with this one which I immagine is pretty common. I have created a a macro which in turn creates a series of charts to display. While on my machine they appear perfectly placed, when other users access the macro the charts will be a differant dimension and not in the right place. Of course this is very frustrating for other users, no so much myself however :) I was hoping there was a way to define possibly by Cell Referance where the charts appear? All help will be greatly appreciated. Thanks, Luke |
Chart Placement incorrect in macro due to differant screen resolutions
One way:
With ActiveSheet .ChartObjects(1).Top = Range("F10").Top .ChartObjects(1).Left = Range("F10").Left End With In article . com, wrote: I was hoping there was a way to define possibly by Cell Referance where the charts appear? |
Chart Placement incorrect in macro due to differant screen resolutions
Similarly,
With ActiveSheet .ChartObjects(1).Width = Range("F10:M30").Width .ChartObjects(1).Height = Range("F10:M30").Height End With - Jon ------- Jon Peltier, Microsoft Excel MVP Tutorials and Custom Solutions Peltier Technical Services, Inc. - http://PeltierTech.com _______ "JE McGimpsey" wrote in message ... One way: With ActiveSheet .ChartObjects(1).Top = Range("F10").Top .ChartObjects(1).Left = Range("F10").Left End With In article . com, wrote: I was hoping there was a way to define possibly by Cell Referance where the charts appear? |
All times are GMT +1. The time now is 07:02 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com