Consulting

Results 1 to 3 of 3

Thread: Solved: Kill all combo boxes w/ one shot

  1. #1
    VBAX Tutor joelle's Avatar
    Joined
    Apr 2005
    Location
    Sunnyvale, CA
    Posts
    204
    Location

    Solved: Kill all combo boxes w/ one shot

    Gd Morning All,

    Pls how do I at one time delete all the combo boxes.
    As you can see from my macro below, after I copy rows from "sheet a" to "status sort" ws, I have to locate each box, click on its border, and delete each one.
    It would be so nice if you could help me with a pc of code to delete all the combo boxes at one time on the "status sort" ws without missing any of them.

    As always, any help is so much appreciated.
    Nee


    [VBA]Rows("1:4&quot.Select
    Selection.Copy
    Sheets("Status Sort&quot.Select
    Rows("1:1&quot.Select
    ActiveSheet.Buttons.Add(4.5, 63, 144, 12.75).Select
    ActiveSheet.Buttons.Add(5.25, 80.25, 141.75, 11.25).Select
    ActiveSheet.Buttons.Add(16.5, 96, 112.5, 20.25).Select
    ActiveSheet.Buttons.Add(921.75, 19.5, 382.5, 11.25).Select
    ActiveSheet.Paste
    ActiveSheet.Shapes("Button 7&quot.Select
    Application.CutCopyMode = False
    Selection.Delete
    ActiveSheet.Shapes("Button 6&quot.Select
    Selection.Delete
    ActiveSheet.Shapes("Button 5&quot.Select
    Selection.Delete
    ActiveWindow.SmallScroll ToRight:=7
    ActiveSheet.Shapes("Button 8&quot.Select
    Selection.Delete
    ActiveSheet.Shapes("Button 4&quot.Select
    Selection.Delete[/VBA]

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    [vba]
    Dim shp As Shape
    For Each shp In ActiveSheet.Shapes
    shp.Delete
    Next shp
    [/vba]

  3. #3
    VBAX Tutor joelle's Avatar
    Joined
    Apr 2005
    Location
    Sunnyvale, CA
    Posts
    204
    Location
    Hello xld,

    Many many thanks for your quick help with the code -- works like a charm.
    No sunshine over here but do I care? Again, love the code.

    Thanksfully,
    Nee

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •