View Full Version : Issue about size in excel

07-05-2007, 10:58 AM
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


07-05-2007, 12:14 PM
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.

07-05-2007, 01:12 PM
This KB (http://vbaexpress.com/kb/getarticle.php?kb_id=337) includes a routine to determine screen resolution