+ Reply to Thread
Results 1 to 9 of 9

Hide Selected Shape Highlighting

  1. #1
    Registered User
    Join Date
    04-27-2011
    Location
    Idaho, US
    MS-Off Ver
    Excel 2010
    Posts
    10

    Question Hide Selected Shape Highlighting

    I know of ways to hide excels title bar, menu bar, windows start menu and taskbar, etc. from vba.
    How would go about hiding the box/outline/frame/adjusters that surround a selected shape in excel using vba?


    also posted question here:
    http://www.xtremevbtalk.com/showthread.php?t=321047
    Last edited by Brown207; 04-27-2011 at 11:49 AM.

  2. #2
    Valued Forum Contributor
    Join Date
    06-19-2010
    Location
    Holywell, N Wales, UK
    MS-Off Ver
    Excel 2013
    Posts
    470

    Re: Hide Selected Shape Highlighting

    Hi Brown207
    Welcome to the forum.
    There are probably a number of ways to do some of these things.

    Have a look at the attached and in the macro edit the line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Then re-run the macro
    This will illustrate the idea.

    After that I suggest you look in the IDE Object Browser (press F2)
    put "Excel" as the Library in the top box
    put "Shape" in the search box
    then select "Shape" in the Classes list to see the various properties you can control
    barry
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    04-27-2011
    Location
    Idaho, US
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide Selected Shape Highlighting

    Thanks for the reply but not at all what I'm looking for.

    I'm not looking to simply hide a shape's line by adjusting its transparency... That's why I equated this question originally to the ability of vba to hide Excel toolbars, Windows start menu, etc.

    Here's more detail:
    When you select a shape, Excel outlines the shape with a box with corner and side adjusters and sometimes with the yellow diamond attribute adjuster and/or a green circle attached perpendicular to the shape to adjust its angle.
    That is what I'm talking about wanting to hide/disable/whatever here.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Hide Selected Shape Highlighting

    You can not get rid of the selection box if you select the shape.
    Why would you want to hide it? If these is for other users of your workbook and the shape is part of the interface then maybe you need to look at protection of the workbook and objects on it.
    Cheers
    Andy
    www.andypope.info

  5. #5
    Registered User
    Join Date
    04-27-2011
    Location
    Idaho, US
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide Selected Shape Highlighting

    This is a solution I have sought for over a year and seems to be the only plausible way to effectively work with moving graphics in Excel. Excel requires that a shape is selected in order to change much of its properties, such as graphically dragging it across the screen.

    I'm aware of all the basic coding I keep getting referred to. I'm even aware of how to change Windows user settings and display options from vba, so it seems possible to hide this selection box.

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Hide Selected Shape Highlighting

    You are not really explaining why you would want to select a shape and NOT see the selection handle and be able to access it properties.

    At a guess I would assume your shapes are acting as an interface and all you want is movable objects. If that the case excel is probably not the tool to be using or at least not directly via the worksheet. You could use a userform which would allow you to move shapes around via click and drag. Of course this would require some coding.

  7. #7
    Registered User
    Join Date
    04-27-2011
    Location
    Idaho, US
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide Selected Shape Highlighting

    Nevermind, I'll figure it out... Almost have btw

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,436

    Re: Hide Selected Shape Highlighting

    Over at your other post you say, "The macro is modifying the shape and moving it graphically across the page. As it does this it needs to have the shape selected".

    Having to have the shape selected in order to move it with code is not necessary. Is your code using the selection object?
    Perhaps you should post an example of your code.

  9. #9
    Registered User
    Join Date
    04-27-2011
    Location
    Idaho, US
    MS-Off Ver
    Excel 2010
    Posts
    10

    Re: Hide Selected Shape Highlighting

    You're right, not for 2003 or 2010. But it is necessary in Excel 2007 when modifying certain shape attributes.

    For now my fix is to just use 2010 and forget about 2007 compatibility.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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