Checkbox usage in Excel

R

Raj

Hi,

I have the following requirement in one of our project where I need to use
the checkbox creation and deletion.

1) I have to add rows filled with data and the first column of the row will
have
a checkbox(uncheked).
2) once the user select few checkbox and request an action by clicking an
cmd button,
it should delete few rows and remove the checkbox as well.

As of now I used the following code to create checkbox dynamically

For Each r In Worksheets("Sheet1").Range("A1:A20").Cells
With
ActiveSheet.CheckBoxes.Add(Worksheets("PrincipleOrders").Cells(Start_Row,
1).Left _
+ 5, Worksheets("PrincipleOrders").Cells(Start_Row, 1).Top - 2, 5, 5)
..Caption = ""
..LinkedCell = Worksheets("PrincipleOrders").Cells(Start_Row,
1).Address(False, False)
End With

Problem comes when I have to delete any selected row and move up the below
rows.
Someone pl. help in getting a solution or better approach for this
requirement.
Thx in advance.....
Raj
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top