+ Reply to Thread
Results 1 to 3 of 3

Need help with grouping shapes using an array

  1. #1
    Registered User
    Join Date
    10-12-2013
    Location
    California
    MS-Off Ver
    Excel 2010 (Mac OS X)
    Posts
    2

    Need help with grouping shapes using an array

    Hi all,

    I need to group a decent sized selection of shapes (25) and apply a name. I've been successful doing this using the long, brute force approach below:

    Please Login or Register  to view this content.
    As you can see, this is messy and prone to typos. If I need to change anything it will be easy to break and difficult to troubleshoot. Since the call is using the "Array" function, I would like to build a 1-dimensional array and just call that instead. Here's the array I built:

    Please Login or Register  to view this content.
    The problem is I've not been successful calling my "shapeArray" in the Shapes Range function from the original line. Can anyone help with the correct syntax to use in this situation?
    Last edited by alansidman; 10-13-2013 at 01:29 AM. Reason: Code tags added

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Need help with grouping shapes using an array

    You missed out MINLINE and MAXLINE, could that be the problem? And make sure your array is dimmed to start from 1

  3. #3
    Registered User
    Join Date
    10-12-2013
    Location
    California
    MS-Off Ver
    Excel 2010 (Mac OS X)
    Posts
    2

    Re: Need help with grouping shapes using an array

    Thanks Millz. That was an oversight (MINLINE/MAXLINE were added later).

    Figured it out after playing around a little more. What I was missing was the () after the name of the array. Seems to work well and is much cleaner.

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Shapes.Range(Array(...))
    By jdaw1_SG in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-03-2011, 05:01 AM
  2. determining selection is array of shapes
    By a1s2d3f4 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-07-2009, 11:18 AM
  3. checking if shapes exist and grouping them
    By gummi in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-21-2008, 11:12 AM
  4. Grouping Shapes
    By LaraBee in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-14-2007, 03:55 PM
  5. [SOLVED] Shapes Range Array
    By Bubb in forum Excel General
    Replies: 1
    Last Post: 04-10-2006, 06:51 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