Results 1 to 8 of 8

Checkbox won't delete

Threaded View

  1. #1
    Forum Expert
    Join Date
    03-31-2009
    Location
    Barstow, Ca
    MS-Off Ver
    Excel 2002 & 2007
    Posts
    2,164

    Checkbox won't delete

    I'm using this code to delete all checkboxes below a given top.
     
                   With sh
                        For i = 1 To .CheckBoxes.Count
                            Set ck = Nothing
                            On Error Resume Next
                            Set ck = .CheckBoxes(i)
                            On Error GoTo HE
                            If Not ck Is Nothing Then
                                If ck.Top >= dTop Then
                                    ck.Delete
                                End If
                            End If
                        Next i
                    End With
    No matter what I do, it always leaves one checkbox. It deletes all the others, but always leaves one.
    Last edited by foxguy; 08-24-2010 at 05:01 PM.
    Foxguy

    Remember to mark your questions [Solved] and rate the answer(s)
    Forum Rules are Here

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