Results 1 to 2 of 2

Not able to get AlternativeText

Threaded View

  1. #1
    Registered User
    Join Date
    03-29-2019
    Location
    Fresno, CA
    MS-Off Ver
    2019
    Posts
    55

    Not able to get AlternativeText

    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
    Last edited by RyderS; 11-29-2022 at 08:15 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 5
    Last Post: 11-21-2011, 01:00 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1