Hi All.
Just want to read a number in the AlternativeText of a shape (using it as a scaling factor)
But it's returning an empty string... (yes, there really is a number assigned to the alternative text
Can someone save me from the error of my ways?
Dim oCaller As Object
Set oCaller = ActiveSheet.Shapes(Application.Caller) 'What Object called this routine?
oCaller.Copy 'Copy it
ActiveSheet.Paste 'Paste it at cursor location
If CInt(oCaller.AlternativeText) > 0 Then 'see if we are to rescale object
MuhScale = CInt(oCaller.AlternativeText) 'if so, get the scale factor
With Selection
.ShapeRange.LockAspectRatio = msoFalse 'apply to each axis individually
.ShapeRange.ScaleWidth MuhScale, msoTrue
.ShapeRange.ScaleHeight MuhScale, msoFalse
End With
End If
Thanks for your kind help.
[EDIT: This actually DOES work... bu tjust not for all shapes. It's broken somehow on some shapes. rats.]
R
Bookmarks