View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Delete range on another sheet when checkbox is unchecked

change this:
worksheets("Orderform").range("a1").resize(1,6).cl earcontents
to
worksheets("Orderform").range("a1").entirerow.dele te



Robb27 wrote:

Dave,
That works, but I was hoping it would delete the entire row. That way it
would bump the other rows below it up one row. I tried changing the
"clearcontents" to deleterow, but that didn't work.
Thanks Dave

Robb

"Dave Peterson" wrote:

Maybe...

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Worksheets("PartsSheet1").Range("A2:F2").Copy _
Worksheets("OrderForm").Range("A1")
else
worksheets("Orderform").range("a1").resize(1,6).cl earcontents
End If
End Sub

Robb27 wrote:

I have an order form. Users check a box next to an item and it copies the
item to another page (the form). I want them to be able to uncheck the box
and have it "undo" what the checkmark does. (deletes the item order for that
item).

Here is the code I'm using to move the item to the order form.

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
Worksheets("PartsSheet1").Range("A2:F2").Copy
Worksheets("OrderForm").Range("A1")

End If
End Sub

Thank you.

Rob


--

Dave Peterson


--

Dave Peterson