Consulting

Results 1 to 3 of 3

Thread: Issue about size in excel

  1. #1

    Issue about size in excel

    I have write a macro to resize the chart in excel file. It runs well at home. But when i run it in another PC, I found that, the size is change a little bit (in comparison with the colume it cover).

    The same thing happens with positioning shape in chart. I insert shape in chart, then use macro to re-position it and run the same macro in another machine. It makes two difference results???

    my wondering is "is there anyway, kind of relative resize" so i can make chart, shape change independently with PC, I mean make the same result everytime, everywhere

    thanks

  2. #2
    VBAX Regular Ebrow's Avatar
    Joined
    May 2007
    Posts
    67
    Location
    The difference is due to the resolution. The resolution must be different between your different pc's and therfore you are getting different results.

    When you use the resize function you are giving it size parameters that are in pixels, pixels are relevant to resolution.

    To make the move even, you will need to write some code to work out the resolution of the screen and resize relative to this.
    Nothing is impossible, just it hasn't been thought of yet.

  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    This KB includes a routine to determine screen resolution
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

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