+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Valued Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    623

    Delete List Box from Sheet

    Hi all,

    I 've got a list box that I need to remove using a macro.
    So far all my attempts to remove it has failed.
    If someone can help, I'd be much obliged.

    Code:
        Dim Ctrl As Object
        With ActiveSheet
          For Each Ctrl In .Buttons
            Ctrl.Delete
          Next Ctrl
        
          For Each Ctrl In .DropDowns
            Ctrl.Delete
          Next Ctrl
          
            '  For Each Ctrl In .List
    ' also tried listbox
     'and listbox(1).delete
       ' Ctrl.Delete
       ' Next Ctrl
       ' ListBox1.ListCount
    Thanks,

    BDB
    Attached Files Attached Files
    Last edited by bdb1974; 03-16-2010 at 11:24 AM.

  2. #2
    Forum Moderator Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2007
    Posts
    5,212

    Re: Delete List Box from Sheet

    Hi BDB, close...
    Code:
    For Each Ctrl In .ListBoxes
        Ctrl.Delete
    Next Ctrl

  3. #3
    Valued Forum Contributor
    Join Date
    12-10-2008
    Location
    Austin
    Posts
    623

    Re: Delete List Box from Sheet

    Thanks Paul,

    That did it.


    BDB

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.2.0