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

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