UNSOLVED

Crosbylake

updated

19 years ago

C

Crosbylake

73 Posts

0

2723

July 11th, 2007 16:00

VB Excel

Anyone know how to get a handle on the name of a pic installed on a Excel worksheet?
Problem. I have an Excel program that installs/deletes various pics on a worksheet many times. Each time the pic is enstalled it is given a sequential number (Picture N). I can't find a way to change the name  (make it permanent) so it's easier to track and manipulate.
Thanks for any assistance.
  • abach

    1728 Posts

    149

    0

    Posted July 12th, 2007 10:00

    Try the following code snippet:.(If smilies appear, they should be replaced with a closing Parentheses. This post thinks I am trying to insert them)
     
    Sub SelectShape()
        Dim myShape As Shape
        

        ActiveSheet.Shapes("Picture 2").Select 'Object to select
        Selection.Name = "Bldg One" 'Rename object
        Set myShape = ActiveSheet.Shapes("Bldg One")
        myShape.Select
       
    End Sub


    Message Edited by abach on 07-12-2007 07:28 AM
  • Crosbylake

    73 Posts

    149

    0

    Posted July 12th, 2007 11:00

    Thanks Allan, that works perfectly and exactly what I was looking for.
    Much Obliged
    Crosbylake