+ Reply to Thread
Results 1 to 6 of 6

Remove data when checkbox is unchecked

  1. #1
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Remove data when checkbox is unchecked

    Good day all once again,

    I have a Userform with a series of checkboxes, when a box is checked it then populates "Page4+" with the requested range, however when unchecked this information needs to be removed from "Page4+",
    I have a code below that used to work but for some reason no longer removes the data when unchecked...any help as always would be greatly appreciated, thank you all & have a great day - Marco


    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Remove data when checkbox is unchecked

    The code is looking for "UNLOAD WITH CRANE" and apparently not finding it. Did you change the text within the source Sheets("Test").Range("Crane")? Perhaps not all upper case anymore?

    This will look for any case text
    Set rngFND = .Cells.Find("UNLOAD WITH CRANE", LookIn:=xlValues, LookAt:=xlWhole, MatchCase:=False)

  3. #3
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: Remove data when checkbox is unchecked

    Hi AlphaFrog,
    I've checked every range & title but all are correct, I've attached a sample of my spread sheet if this helps? Thanks again - Marco
    Attached Files Attached Files

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Remove data when checkbox is unchecked

    I have Excel 2003 and it errors when opening your file. Sorry. I have no new ideas.

    BTW: you don't need the On Error Resume Next line in your procedure.

  5. #5
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: Remove data when checkbox is unchecked

    hi matrixprom, the reason is your sheet is protected so you need to unprotect it, delete rows and protect again.

  6. #6
    Forum Contributor
    Join Date
    04-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    329

    Re: Remove data when checkbox is unchecked

    Thanks AlphaFrog, now removed On Error & thanks watersev, the protection advice was spot on! Have a great day guys! - Marco
    Last edited by matrixpom; 01-25-2013 at 12:14 AM.

+ Reply to Thread

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