+ Reply to Thread
Results 1 to 4 of 4

Selecting all pictures in a range

Hybrid View

  1. #1
    Registered User
    Join Date
    05-13-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    5

    Selecting all pictures in a range

    Hi,
    I was trying to select all of the pictures/objects in a certain range (A294:L1400) in order to move them all at the same time. How do I do this?

    Thanks in advance,
    Sven

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Selecting all pictures in a range

    Sub SelectInRange()
    Dim sh As Shape, isect, sharr() As String
    Set Rng = Range("A294:L1400")
    For Each sh In ActiveSheet.Shapes
      Set isect = Application.Intersect(sh.TopLeftCell, Rng)
      If Not isect Is Nothing Then
        s = s + sh.Name & ","
      End If
    Next
    s = Left(s, Len(s) - 1)
    sharr = Split(s, ",")
    ActiveSheet.Shapes.Range(sharr).Select
    End Sub
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    05-13-2013
    Location
    Belgium
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Selecting all pictures in a range

    Many many many thanks Patel45!! That worked like a charm

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Selecting all pictures in a range

    Selecting multiple pictures is easy:

    ActiveSheet.Pictures(Array("Picture 1", "Picture 2")).Select
    The hard part is defining what you mean by pictures being "in" a range. Because pictures are two-dimensional, part of the picture can overlap the range and another part of the picture can be outside the range.
    Gary's Student

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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