I've build a planboard and I'm using shapes to represent work packages.
Users can move around the shapes and below code would return the first and last cell the rectangle is placed in.
Now I want to prevent that the users can move the shapes to certains cells (or the other way around : make sure they will always put the rectangle in a certain range).
Is there a way to do this? I know that I can lock cells for inserting values but shapes seems to float over the cell.
Code:
Worksheets("Sheet 1").Range("A1").Value = Cells(Sheet1.Shapes("Rectangle 4").TopLeftCell.Row, Sheet1.Shapes("Rectangle 4").TopLeftCell.Column).Value
Worksheets("Sheet 1").Range("B1").Value = Cells(Sheet1.Shapes("Rectangle 4").BottomRightCell.Row - 1, Sheet1.Shapes("Rectangle 4").BottomRightCell.Column).Value
Users can move around the shapes and below code would return the first and last cell the rectangle is placed in.
Now I want to prevent that the users can move the shapes to certains cells (or the other way around : make sure they will always put the rectangle in a certain range).
Is there a way to do this? I know that I can lock cells for inserting values but shapes seems to float over the cell.
Code:
Worksheets("Sheet 1").Range("A1").Value = Cells(Sheet1.Shapes("Rectangle 4").TopLeftCell.Row, Sheet1.Shapes("Rectangle 4").TopLeftCell.Column).Value
Worksheets("Sheet 1").Range("B1").Value = Cells(Sheet1.Shapes("Rectangle 4").BottomRightCell.Row - 1, Sheet1.Shapes("Rectangle 4").BottomRightCell.Column).Value