+ Reply to Thread
Results 1 to 7 of 7

How do I find all the extra buttons?

  1. #1
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Cool How do I find all the extra buttons?

    On the attached sheet is an example of a problem I've discovered on a project I'm working on. There are all these extra buttons on sheet1. I'm thinking I put a button on a sheet to execute a macro and then copied and pasted the rows/columns many times, not realizing the button was being copied also.

    ?Activesheet.buttons.count tells how many buttons are on the sheet. Is there a way to locate them? Delete Them?

    How do I use the object browser (or any tool) to find these? Is there a range.select for shapes or buttons?
    Attached Files Attached Files
    Last edited by MarvinP; 08-25-2010 at 08:26 AM.

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How do I find all the extra buttons?

    Please Login or Register  to view this content.
    will get rid of all of them.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How do I find all the extra buttons?

    This will delete all buttons except Commandbutton 1

    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How do I find all the extra buttons?

    How do I get a list of all the possible attributes of the shapes/buttons? Name? Caption? Top? etc..

  5. #5
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: How do I find all the extra buttons?

    Check the Object browser.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: How do I find all the extra buttons?

    I'm not good with the Object Browser yet but I do find some success in the immediate window with statements like:

    ?worksheets("Sheet1").shapes.count
    which gives back 18

    or
    ?worksheets("Sheet1").shapes(4).name
    which gives back Button 7

    HEY!! I just tried
    ?worksheets("Sheet1").shapes(4).topleftcell.address
    which gave back $G$1048567 <<<<This is what I was looking for...

    I guess I'm not too old to still learn stuff.

  7. #7
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Smile Re: How do I find all the extra buttons?

    The final answer comes with a little code:
    Please Login or Register  to view this content.
    Which is included in the attached.
    Attached Files Attached Files

+ 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