Macro to resize and position chart

ovningar

New member
Joined
Feb 7, 2014
Messages
1
Reaction score
0
Points
0
Hello Everybody,


I would really appreciate your feedback on one small issue. I am actually trying to show in an Excel Dashboard the content of one Gannt Chart which sistematically changes in size and position everytime that it is opened by a different user (using other laptops).


The basic macro contains the following code,


Sub resizeGantt()
With Sheets(Range("valDBShtName") & "").Shapes.Range(Array("prjGantt"))
.Left = 250
.Top = 200
.Height = 3.3 * 72
.Width = 9.1 * 72
End With
End Sub


The process to ensure that the Chart is positioned and sized properly consist in: 1. Enable macros once the file is opened; 2. Run the macro; 3. Save the Excel File; 4. Re-open file. However, I believe that there should be a more efficient way to deal with this.


Any comments would be really welcome!


TIA.
 
you need to look into Excel's Trust Center Settings.
 
Back
Top