

December 13, 2017

I recorded a macro to align label positions in a graph.
Here is an example for the label position of one data point:
ActiveSheet.ChartObjects("Chart 2").Activate
ActiveChart.FullSeriesCollection(11).Points(10).DataLabel.Select
Selection.Left = 200.302
It works fine, but what could be the reason, that if a colleague runs the macro on a different computer the position of the labels is different? The macro still works fine, just the position is not where it should be, but more to the right.

Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service

November 8, 2013



December 13, 2017

Hi Catalin,
so we have 4 possible resolutions to consider: 2(him and me) 2(primary and secondary screen).
Now add different colleagues and a 3rd screen for everyone ... 🙂
A solution could be to adapt the resolution before running the macro. Could that be dealt also by VBA?
Thanks,
Matthias

Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service

November 8, 2013

Hi Matthias,
You can try this code: http://www.vbaexpress.com/kb/g.....p?kb_id=32
Note that the icons on the desktop of that user may be messed up when you change the resolution.
1 Guest(s)
