+ Reply to Thread
Results 1 to 6 of 6

Finding a command button in a row and deleting it.

  1. #1
    Registered User
    Join Date
    07-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    57

    Finding a command button in a row and deleting it.

    Hi there!
    I am trying to find a way to select a command button in a row and delete it. There will always be a command button in the row. All of the command buttons have the same text.

    Please Login or Register  to view this content.
    RemItem is an array that was loaded in a previous sub. I do not have problems with that sub. The data in the array is string data (names), but if you think it is relevant, then I can put that here... Really just wondering if there is a way to select a command button in a specific row.

  2. #2
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Finding a command button in a row and deleting it.

    Hi Ataraxicatom,

    try this as an alternative, which looks at the row of each commandbutton and matches with the cell.

    Please Login or Register  to view this content.
    Regards,
    berlan
    Last edited by berlan; 12-18-2014 at 09:01 PM.

  3. #3
    Registered User
    Join Date
    07-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Finding a command button in a row and deleting it.

    That did not work. It just shrinks the buttons up on row 2. The rest of it works just fine. I'll play with it a bit and see if there is something I am missing.

    -Ok! I lied! That works just fine. I am using form control buttons and not active x buttons. Is there a way to do the same thing for form controls that you did for the active x objects?
    Last edited by Ataraxicatom; 12-18-2014 at 10:44 PM.

  4. #4
    Registered User
    Join Date
    07-12-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Finding a command button in a row and deleting it.

    Ok, so I found a way to do it! I wouldn't have been able to if you had not helped me out. Thanks a million berlan!

    Please Login or Register  to view this content.
    Just in case anyone else needs it in the future. :D

  5. #5
    Forum Expert
    Join Date
    02-22-2013
    Location
    London, UK
    MS-Off Ver
    Office 365
    Posts
    1,218

    Re: Finding a command button in a row and deleting it.

    Glad it worked out, thanks for the kind feedback and positive rep added.

    Best,
    berlan

  6. #6
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: Finding a command button in a row and deleting it.

    Perhaps something like this as well?

    Please Login or Register  to view this content.
    Alf

+ 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. Not deleting the selected data from listbox by one click on command button
    By biznez1 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-31-2013, 12:05 PM
  2. [SOLVED] Move record to different sheet and then deleting it through a userform command button
    By dev111ski in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2012, 06:30 AM
  3. Replies: 1
    Last Post: 09-17-2007, 09:57 PM
  4. [SOLVED] Deleting Command Button
    By James W. in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-11-2005, 05:06 PM
  5. deleting a row with checkbox and command button
    By student123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-06-2005, 02:19 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