I have some old VB6 code that adds a shape to an Excel chart.
' add a label to display the results
Set BoxShape = Chart.Shapes.AddLabel(1, ScaleToPointsX(series, x), ScaleToPointsY(series, y) - 20, 1, 1)
BoxShape.TextFrame.Characters.Text = sText
This works fine on some machines, but on others the size is not set correctly. On investigation this appears to be because the Autosize property is not always defaulting to True.
The code has been running for years on various versions of Excel. I have two PCs both running Excel 2007 (exact same build version) one of them works fine (Autosave defaults to True) and the other the shape does not appear (Autosize defaults to False). The one that works is Windows 7 and the one that doesn't is Windows 10, but I doubt that is the issue.
I think I can fix the problem by explicitly setting TextFrame.Autosize to True when the shape is created, but I am curious as to what defines how this value is set initially. Is there some global setting in Excel that affects this?