+ Reply to Thread
Results 1 to 6 of 6

Deleting Several Form Control Items

  1. #1
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Deleting Several Form Control Items

    Greetings,
    I have a worksheet that contains several From Control Items. Ex: Options Buttons, Group Boxes, etc. I am needing to copy/paste this worksheet (creating several other worksheets) and remove several of the Form Controls. Other than selecting each of them separately, is there a way to remove them all at once?

  2. #2
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: Deleting Several Form Control Items

    Try the following

    Please Login or Register  to view this content.
    HTH,
    Maud

  3. #3
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Deleting Several Form Control Items

    Maud,

    Thank you for the quick reply!

    How do I control which rows that will be deleted. Also, I assume I create button and insert this code?

  4. #4
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: Deleting Several Form Control Items

    is there a way to remove them all at once?
    The code removes all shapes; no rows are deleted. If you want certain rows deleted, that would be additional code to add. If you add a form button, you can assign it the macro however, the button will be removed as well. If a one-time run of the code then that is OK. If you choose to use an activeX button, while in design mode, right click > view code> paste the code in the event procedure. This button will too be removed by the code. You will always, however, be able to run the code by using Alt-F8 then run the macro.

    HTH,
    Maud

  5. #5
    Forum Contributor
    Join Date
    07-07-2017
    Location
    USA
    MS-Off Ver
    2010
    Posts
    500

    Re: Deleting Several Form Control Items

    Maud,

    Thank you for clarifying.

    What code would I need to add to delete row 23 and all the Form Controls within this row?

  6. #6
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: Deleting Several Form Control Items

    Hi Brentjohn,

    Without a sample of your spreadsheet, help me better understand what you want to do.

    Here is what I am gathering:

    You had initially asked to delete all the shapes on the form and it now seems as though they are all aligned on row 23. You still want to delete them all but you would like row 23 deleted as well.

    Question:

    Will they always be aligned on row 23 and will you always want row 23 deleted
    Please Login or Register  to view this content.
    OR
    they may be aligned on possibly any line (with the left top corner of the control in the cell of the row) and still need to be deleted along with the row they are aligned on?
    Please Login or Register  to view this content.
    HTH,
    Maud

+ 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. [SOLVED] Run private sub assigned to Active X Control with a Form Control Button
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-24-2017, 11:38 PM
  2. Control display of chart using checkbox (form control)
    By Jonno1 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 09-09-2016, 09:43 AM
  3. Deleting range given location of pressed form control
    By AaronChurchill in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-11-2015, 06:44 PM
  4. How to use form control dropdowns to list items based on a condition
    By ssraj in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-16-2014, 07:08 AM
  5. [SOLVED] VBA Code to have a repeating form control /Active X control (List box) in every row
    By Ehezve in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-28-2013, 08:55 PM
  6. [SOLVED] Hiding/Showing a Form Control with another Form Control
    By SonOfOdin in forum Excel General
    Replies: 2
    Last Post: 06-20-2012, 09:55 AM
  7. Selecting different items in a form control list box by VBA
    By brzpptp2 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-15-2010, 04:37 AM

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