Hello,
I have a code for a priority tracking list. In this list each row is a material item. Each item has data in it's own row specific to it (time-stamps...etc.). Each row is assigned a priority from 1 (top) to bottom.
Problem:
Each row has several check boxes that, when checked, assign a timestamp to the cell to the right of it (for metrics tracking purposes). The issue occurs when I assign a new priority to an item (ex. going from #5 to #1), the list will re-number itself according to its new priority. During this re-numbering it seems that the check boxes are copied to their new location but are still associated to their old cell location. So when a user clicks the new checkbox, it assigns a timestamp to the row next to the check-boxed cell's previous location. Also, I now have check boxes on top of check boxes in my list (I'm sure this adds data to the file that is unnecessary).
What I want to happen:
When an item is assigned a higher priority - VBA will cut the entire row and paste it to where it is supposed to land in the list (ascending order). This way I suspect I will not have duplicate check boxes and the check boxes will still be assigned to their proper rows (ie. when I click a check box that has moved it will timestamp the cell to the right of it, never to the right of the old check box cell's location).
Guesses:
I'm thinking that maybe my "Enumeration Renumeration" code is copying cells and thus copying check boxes? Or maybe this is a product of the check boxes themselves? Should I be using some other commands to move a rows and then use an "If" for it to roll through the entire list?
Code:
For sheet 1, main code:
Code in ThisWorkbook mainly for audit trail but may have something else:
Code in Module 1 for check boxes that timestamp the cell to the right of the check box:
If you have any ideas please shoot them over! I'm new to VBA so if you can explain the reasoning behind certain decisions I would love to hear it and learn from you!
Thank you!
Bookmarks