Results 1 to 2 of 2

Thread: Macro to resize and position chart

  1. #1

    Macro to resize and position chart



    Register for a FREE account, and/
    or Log in to avoid these ads!

    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.

  2. #2
    Magician NoS's Avatar
    Join Date
    Jan 2013
    Location
    British Columbia
    Posts
    718
    Articles
    0
    Excel Version
    Excel 2010 64bit
    you need to look into Excel's Trust Center Settings.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •